Welcome! Please see the About page for a little more info on how this works.
After CLJ-1232 was committed to master, it is possible for the Clojure compiler to throw a NPE if a defn is type hinted with a invalid type. This surfaces in CLJS where the defn macro is re-used by the ClojureScript compiler, but I think it raises the question: "Should a bad type hint result in a compiler exception?"
The offending line can be found here on GitHub: https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L247
Comment made by: alexmiller
This is basically the same as CLJ-1868, but I think what you are asking here is whether bad type hints should be ignored or throw any exception, right?
(Whereas CLJ-1868 is about which exception/message is thrown)
Comment made by: halgari
Agreed. I think another possible solution would be to update CLJS to not use the CLJ defn, but I still think that a bad type hint should just be ignored.
Comment made by: bronsa
I don't agree that we shoud ignore bad type hints. If the compiler knows that something is wrong, it should tell the user immediately rather than silently ignoring and potentially failing at runtime later
Description could use some examples