Skip to content

resolve-tag should ignore local environment #455

@frenchy64

Description

@frenchy64

AFAIK a tag is resolved from the global environment, not local scope. For example this works fine even though we shadow Class with a local.

(let [Class nil] ((fn [^Class a] (.getName a)) Integer))

(resolve {'Class true} 'Class) ;; emulating Schema's tag inference
;=> nil

(resolve 'Class) ;; what I suspect is more correct
;=> java.lang.Class

Relevant line:

(let [resolved (delay (resolve env tag))]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions