Test cases that should succeed and fail for star/dots mixes.
This commit is contained in:
parent
6da5171b28
commit
df91f204d2
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
(require typed-scheme/private/extra-procs)
|
(require typed-scheme/private/extra-procs)
|
||||||
|
|
||||||
#;(map* + (list 1 2 3) (list 10 20 30) (list 'a 'b 'c))
|
(map* + (list 1 2 3) (list 10 20 30) (list 'a 'b 'c))
|
||||||
|
|
||||||
;; Arity mismatch.
|
;; Arity mismatch.
|
||||||
(: g (Integer Integer Integer -> Integer))
|
(: g (Integer Integer Integer -> Integer))
|
||||||
|
@ -10,9 +10,7 @@
|
||||||
|
|
||||||
(map* g (list 1 2 3) (list 4 5 6))
|
(map* g (list 1 2 3) (list 4 5 6))
|
||||||
|
|
||||||
;; Can't use a starred function with more fixed args
|
|
||||||
;; for a dotted function.
|
|
||||||
(: h (Integer Integer Integer * -> Integer))
|
(: h (Integer Integer Integer * -> Integer))
|
||||||
(define (h x y . z) 0)
|
(define (h x y . z) 0)
|
||||||
|
|
||||||
(map* h (list 1 2 3) (list 4 5 6))
|
(map* h (list 1 2 3))
|
|
@ -7,4 +7,11 @@
|
||||||
|
|
||||||
(map* f (list 1 2 3) (list 10 20 30))
|
(map* f (list 1 2 3) (list 10 20 30))
|
||||||
|
|
||||||
#;(map* + (list 1 2 3) (list 10 20 30) (list 10 20 30))
|
(map* + (list 1 2 3) (list 10 20 30) (list 10 20 30))
|
||||||
|
|
||||||
|
(map* + (list 1 2 3) (list 10 20 30) (list 10 20 30) (list 10 20 30) (list 10 20 30) (list 10 20 30) (list 10 20 30) (list 10 20 30) (list 10 20 30) (list 10 20 30) (list 10 20 30) (list 10 20 30) (list 10 20 30) (list 10 20 30) (list 10 20 30) (list 10 20 30))
|
||||||
|
|
||||||
|
(: h (Integer Integer Integer * -> Integer))
|
||||||
|
(define (h x y . z) 0)
|
||||||
|
|
||||||
|
(map* h (list 1 2 3) (list 4 5 6))
|
Loading…
Reference in New Issue
Block a user