diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-funapp.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-funapp.rkt index 32505178..b7f3cc8d 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-funapp.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-funapp.rkt @@ -158,7 +158,7 @@ [(Union: (and ts (list (? Function?) ...))) (merge-tc-results (for/list ([fty ts]) - (tc/funapp f-stx args-stx fty argtys expected)))] + (tc/funapp f-stx args-stx fty args-res expected)))] ;; error type is a perfectly good fcn type [(Error:) f-type] ;; otherwise fail diff --git a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/typecheck-tests.rkt b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/typecheck-tests.rkt index dc84631a..72538fb2 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/typecheck-tests.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-test/tests/typed-racket/unit-tests/typecheck-tests.rkt @@ -3102,6 +3102,10 @@ b) -Bottom] + [tc-e + ((if (even? 4) add1 (inst values Integer)) 4) + -Int] + ) (test-suite