Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolve-tag should ignore local environment #455

Open
frenchy64 opened this issue Apr 25, 2024 · 0 comments
Open

resolve-tag should ignore local environment #455

frenchy64 opened this issue Apr 25, 2024 · 0 comments

Comments

@frenchy64
Copy link
Contributor

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))]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant