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

0 votes
in ClojureScript by
If someone writes {{(defn foo ^String \[x\] (js/bar x))}} it would be useful to improve the outcome in this situation.

Potentially warn about the misplaced hint and perhaps potentially warn about upper-cased versions of hints.

Conversely, I think we have places where ClojureScript honors Clojure-specific type hints like Integer / Long, in the name of compatibility in the face of compiling cljc files.

Also, we could consider accepting type hints after the function name symbol.

(Not attempting to specify a solution, but just that it could be improved either via warning or automatically patching up.)

1 Answer

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJS-2973 (reported by mfikes)
...