[CTYP-116] Apply doesn't work with dotted arguments Created: 11/Mar/14 Updated: 20/Jul/14 Resolved: 20/Jul/14
|Reporter:||Gary Fredericks||Assignee:||Ambrose Bonnaire-Sergeant|
On type-check throws this exception:
I'm using core.typed version 0.2.36.
|Comment by Ambrose Bonnaire-Sergeant [ 11/Mar/14 10:31 PM ]|
I suspect minimal case is:
|Comment by Gary Fredericks [ 11/Mar/14 10:35 PM ]|
Indeed I get the same error with that snippet.
|Comment by Di Xu [ 18/Apr/14 9:25 PM ]|
seems solved this problem
|Comment by Ambrose Bonnaire-Sergeant [ 01/May/14 2:15 PM ]|
Need to look at this closer, but it seems line 63 completely ignores rest/drest types.
|Comment by Di Xu [ 04/May/14 2:34 AM ]|
Oops, that's an error. I added to see how it works, forget to delete it.
The main problem with this patch is it assume user invoke apply with argument that just like declared function type, for example:
(t/ann foo (All [x ...] [Number String x ... x -> bar]))
and invoke with
(apply foo 1 "bar" local-variable)
(apply foo 1 local-variable-with-string-in-first)
but I assume this should be the typical usage of apply, no?
|Comment by Ambrose Bonnaire-Sergeant [ 20/Jul/14 11:20 PM ]|
This now has a readable error actually relevant to the problem, as of 0.2.58