parent
3a7c0b5123
commit
75208f4328
|
@ -88,7 +88,8 @@
|
|||
#:when (free-identifier=? #'val #'e3)
|
||||
(let ([ts (for/list ([ac (in-syntax #'(actuals ...))]
|
||||
[f (in-syntax #'(acc ...))])
|
||||
(let ([type (type-annotation f #:infer #t)])
|
||||
(let ([type (or (type-annotation f #:infer #t)
|
||||
(find-annotation #'inner-body f))])
|
||||
(if type
|
||||
(tc-expr/check/t ac (ret type))
|
||||
(generalize (tc-expr/t ac)))))]
|
||||
|
|
|
@ -130,5 +130,7 @@
|
|||
(match (single-value #'arg)
|
||||
[(tc-result1: (List: ts))
|
||||
(ret (-Tuple (reverse ts)))]
|
||||
[(tc-result1: (and r (Listof: t)))
|
||||
(ret r)]
|
||||
[arg-ty
|
||||
(tc/funapp #'fun #'(arg) (tc-expr/t #'fun) (list arg-ty) expected)])])))
|
||||
|
|
|
@ -4015,6 +4015,12 @@
|
|||
(hfun h)))
|
||||
(void))
|
||||
-Void]
|
||||
;; check that in-naturals works
|
||||
[tc-e (for/list : (Listof Integer) ([i (in-naturals)]) i) (-lst -Int)]
|
||||
[tc-e (for/list : (Listof Natural) ([s '(foo bar)]
|
||||
[i : Natural (in-naturals)])
|
||||
i)
|
||||
(-lst -Nat)]
|
||||
)
|
||||
|
||||
(test-suite
|
||||
|
|
Loading…
Reference in New Issue
Block a user