[CLJ-1231] fn and letfn don't support hinting the function's return type Created: 17/Jul/13 Updated: 18/Jan/16
|Affects Version/s:||Release 1.5|
You can add type hints to the argument vector(s) of `defn` to declare the return type of a function like so (with warn-on-reflection being true):
But sadly, the same doesn't work with `fn` and `letfn`:
I don't see why this feature is available to `defn` but not to `fn` and `letfn`. I even consider it a kind of defect, because anything else including :pre/:post are also supported by the latter two, so the support for hinting the return type should be there simply because of analogy.