Make kw/opt lambda special checks work with other expected values.
Closes PR13544. original commit: d59a600be69da8a487950c2bfbc663a516fc90d4
This commit is contained in:
parent
8377169790
commit
1194117dba
4
collects/tests/typed-racket/xfail/opt-lambda.rkt
Normal file
4
collects/tests/typed-racket/xfail/opt-lambda.rkt
Normal file
|
@ -0,0 +1,4 @@
|
|||
#lang typed/racket/base
|
||||
|
||||
|
||||
(opt-lambda: ((p : Symbol) (log? : Any #f) (1-p? : Any #f)) (ann p Symbol))
|
|
@ -385,7 +385,8 @@
|
|||
[(tc-result1: (and f (or (Function: _)
|
||||
(Poly: _ (Function: _)))))
|
||||
(tc-expr/check/type #'fun (kw-convert f #:split #t))]
|
||||
[(tc-result1: _) (tc-error/expr "Keyword functions must have function type, given ~a" expected)])
|
||||
[(or (tc-results: _) (tc-any-results:))
|
||||
(tc-error/expr "Keyword functions must have function type, given ~a" expected)])
|
||||
expected]
|
||||
;; let
|
||||
[(let-values ([(name ...) expr] ...) . body)
|
||||
|
|
Loading…
Reference in New Issue
Block a user