Open frenchy64 opened 4 months ago
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.
Class
(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:
https://github.com/plumatic/schema/blob/8fcb57f87ffe74185e1f1da72be4933bd4aad4d2/src/clj/schema/macros.clj#L121
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.Relevant line:
https://github.com/plumatic/schema/blob/8fcb57f87ffe74185e1f1da72be4933bd4aad4d2/src/clj/schema/macros.clj#L121