From e97ada3017ddf5e3712af80ea959f7f53b6a1327 Mon Sep 17 00:00:00 2001 From: Eric Dobson Date: Thu, 20 Mar 2014 21:39:00 -0700 Subject: [PATCH] Fix expected use in single-value. original commit: 750e408d942a4335ead436a58684a47026625b21 --- .../typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt | 2 +- .../tests/typed-racket/unit-tests/typecheck-tests.rkt | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt index 37f76198..f50396af 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt @@ -519,7 +519,7 @@ [(tc-result1: _ _ _) t] [_ (tc-error/expr #:stx form - #:return (or expected (ret (Un))) + #:return (ret (Un)) "expected single value, got multiple (or zero) values")])) ;; type-check a body of exprs, producing the type of the last one. 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 1d1fd75e..052f9d3b 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 @@ -2613,6 +2613,10 @@ #:ret (ret (list -Symbol) (list -top-filter ) (list -empty-obj) Univ 'B) #:expected (ret (list -Symbol) (list -no-filter ) (list -no-obj) Univ 'B)] + [tc-err (values (values 'x 'y)) + #:ret (ret (-val 'x)) + #:expected (ret (-val 'x) -no-filter -no-obj)] + ) (test-suite "tc-literal tests"