Adding testcases for dotted function application to rest args via apply.
original commit: 93c937f909b431fa64c49515ae66d87f42711e2b
This commit is contained in:
parent
ca3e58f3a6
commit
265f9c9009
11
collects/tests/typed-scheme/fail/apply-dots.ss
Normal file
11
collects/tests/typed-scheme/fail/apply-dots.ss
Normal file
|
@ -0,0 +1,11 @@
|
|||
#lang typed-scheme
|
||||
|
||||
(plambda: (a ...) ([z : String] . [w : Number])
|
||||
(apply (case-lambda: (([x : Number] . [y : Number ... a]) x))
|
||||
w))
|
||||
|
||||
(plambda: (a ...) ([z : String] . [w : Number])
|
||||
(apply (case-lambda: (([x : Number] . [y : Number ... a]) x)
|
||||
(([x : String] [y : String] . [z : String]) 0)
|
||||
([y : String] 0))
|
||||
w))
|
19
collects/tests/typed-scheme/succeed/apply-dots.ss
Normal file
19
collects/tests/typed-scheme/succeed/apply-dots.ss
Normal file
|
@ -0,0 +1,19 @@
|
|||
#lang typed-scheme
|
||||
|
||||
(plambda: (a ...) ([z : String] . [w : Number ... a])
|
||||
(apply (lambda: ([x : Number] . [y : Number ... a]) x)
|
||||
1 w))
|
||||
|
||||
(plambda: (a ...) ([z : String] . [w : Number ... a])
|
||||
(apply (lambda: ([x : Number] . [y : Number]) x)
|
||||
1 w))
|
||||
|
||||
(plambda: (a ...) ([z : String] . [w : Number])
|
||||
(apply (lambda: ([x : Number] . [y : Number]) x)
|
||||
1 w))
|
||||
|
||||
(plambda: (a ...) ([z : String] . [w : Number])
|
||||
(apply (case-lambda: (([x : Number] . [y : Number ... a]) x)
|
||||
(([x : String] [y : String] . [z : String]) 0)
|
||||
([y : Number] 0))
|
||||
w))
|
Loading…
Reference in New Issue
Block a user