diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/prims.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/prims.rkt index 861230c0..36034c7b 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/prims.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/base-env/prims.rkt @@ -803,7 +803,7 @@ This file defines two sorts of primitives. All of them are provided into any mod (syntax-parse stx #:literals (: Void) ;; the annotation is not necessary (always of Void type), but kept ;; for consistency with the other for: macros - [(_ (~seq : Void) ... + [(_ (~optional (~seq : Void)) ;; c is not always an expression, could be a break-clause clauses c ...) ; no need to annotate the type, it's always Void (let ((body #`(; break-clause ... diff --git a/pkgs/typed-racket-pkgs/typed-racket-tests/tests/typed-racket/fail/for-multiple-annotations.rkt b/pkgs/typed-racket-pkgs/typed-racket-tests/tests/typed-racket/fail/for-multiple-annotations.rkt new file mode 100644 index 00000000..e2f8ca6e --- /dev/null +++ b/pkgs/typed-racket-pkgs/typed-racket-tests/tests/typed-racket/fail/for-multiple-annotations.rkt @@ -0,0 +1,6 @@ +#; +(exn-pred "bad syntax") +#lang typed/racket/base + +(for: : Void : Void ((i 5)) + (displayln i))