diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-app/tc-app-list.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-app/tc-app-list.rkt index 0f22f3ed..6b4cf18d 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-app/tc-app-list.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/typecheck/tc-app/tc-app-list.rkt @@ -97,8 +97,8 @@ (tc-expr/check/t i (ret (subst-all subst (make-F v)))) (tc-expr/t i))))))) ;; special case for `list*' - (pattern (list* . args) - (match-let* ([(list tys ... last) (stx-map tc-expr/t #'args)]) + (pattern (list* (~between args:expr 1 +inf.0) ...) + (match-let* ([(list tys ... last) (stx-map tc-expr/t #'(args ...))]) (ret (foldr -pair last tys)))) ;; special case for `reverse' to propagate expected type info (pattern ((~and fun (~or reverse k:reverse)) arg) 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 dcb10d30..b1f8832f 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 @@ -1000,6 +1000,7 @@ [tc-e/t (if #f 1 'foo) (-val 'foo)] [tc-e (list* 1 2 3) (-pair -One (-pair -PosByte -PosByte))] + [tc-err (list*)] [tc-err (apply append (list 1) (list 2) (list 3) (list (list 1) "foo"))] [tc-e (apply append (list 1) (list 2) (list 3) (list (list 1) (list 1))) (-lst -PosByte)]