ClojureScript

Improved handling of type hinted fn in Clojure style

Details

  • Type: Enhancement Enhancement
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

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

Activity

There are no comments yet on this issue.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: