Make tc/funapp follow contract in error case.

Closes PR 14615.

original commit: 13bc779e2106586b87d4110b7851584a129675b4
This commit is contained in:
Eric Dobson 2014-07-05 16:33:36 -07:00
parent 2e973f3f26
commit 2f4a9a73d5
2 changed files with 7 additions and 1 deletions

View File

@ -160,7 +160,7 @@
(for/list ([fty ts])
(tc/funapp f-stx args-stx fty args-res expected)))]
;; error type is a perfectly good fcn type
[(Error:) f-type]
[(Error:) (ret f-type)]
;; otherwise fail
[(Poly: ns (Function: arrs))
(tc-error/expr

View File

@ -0,0 +1,6 @@
#lang typed/racket/base
(require racket/gui)
(define (f)
(let ([fn (put-file)])
(when fn
(values fn))))