Welcome! Please see the About page for a little more info on how this works.

0 votes
in tools.emitter.jvm by

At present, TEMJVM emits checked code for hinted locals. This isn't correct according to clojure.org, which states that tags are not enforced and and are for reflection elimination rather than Java style static typing.

This issue manifests itself when loading clojure.core/ns-publics, which makes use of a ^clojure.lang.Namespace hinted argument but is expected to accept the java.lang.Object domain as per the stated hinting behavior of clojure.

The fix is to adopt Clojure's checkcast style, in that locals are not type hinted more precisely than Object, nor are function arguments. Only interop sites should actually emit checkcasts.

This behavior is arguably silly but it prevents TEMJVM from self-hosting so there it is.

1 Answer

0 votes
Reference: https://clojure.atlassian.net/browse/TEMJVM-14 (reported by arrdem)