Fix rest arg contract generation for case-> types
The generated contracts are still not ideal when more than one case has a rest argument, since a later case in the case-> contract may pass but case-> won't try all of them.
This commit is contained in:
parent
02d046daf1
commit
fce98517e6
|
@ -515,7 +515,7 @@
|
|||
" with optional keyword arguments")))
|
||||
(if case->
|
||||
(arr/sc (process-dom (map t->sc/neg dom))
|
||||
(and rst (t->sc/neg rst))
|
||||
(and rst (listof/sc (t->sc/neg rst)))
|
||||
(map t->sc rngs))
|
||||
(function/sc
|
||||
(process-dom (map t->sc/neg dom))
|
||||
|
|
|
@ -213,4 +213,9 @@
|
|||
(λ (x) 1)
|
||||
#:untyped
|
||||
#:msg #rx"produced: 1.*blaming: untyped")
|
||||
(t-int (cl->* (->* '() -String -String)
|
||||
(->* (list -Symbol) -Symbol -Symbol))
|
||||
(λ (f) (f "a" "b"))
|
||||
(case-lambda [xs (car xs)]
|
||||
[(sym . xs) sym]))
|
||||
))
|
||||
|
|
Loading…
Reference in New Issue
Block a user