Make tc/funapp follow contract in error case.
Closes PR 14615.
This commit is contained in:
parent
05bc8f3082
commit
13bc779e21
|
@ -160,7 +160,7 @@
|
||||||
(for/list ([fty ts])
|
(for/list ([fty ts])
|
||||||
(tc/funapp f-stx args-stx fty args-res expected)))]
|
(tc/funapp f-stx args-stx fty args-res expected)))]
|
||||||
;; error type is a perfectly good fcn type
|
;; error type is a perfectly good fcn type
|
||||||
[(Error:) f-type]
|
[(Error:) (ret f-type)]
|
||||||
;; otherwise fail
|
;; otherwise fail
|
||||||
[(Poly: ns (Function: arrs))
|
[(Poly: ns (Function: arrs))
|
||||||
(tc-error/expr
|
(tc-error/expr
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
#lang typed/racket/base
|
||||||
|
(require racket/gui)
|
||||||
|
(define (f)
|
||||||
|
(let ([fn (put-file)])
|
||||||
|
(when fn
|
||||||
|
(values fn))))
|
Loading…
Reference in New Issue
Block a user