diff --git a/src/julia-parser.scm b/src/julia-parser.scm index a8f35a54298b6..d8914f14525f1 100644 --- a/src/julia-parser.scm +++ b/src/julia-parser.scm @@ -216,10 +216,6 @@ `(with-bindings ((whitespace-newline #t)) ,@body)) -(define-macro (without-whitespace-newline . body) - `(with-bindings ((whitespace-newline #f)) - ,@body)) - ;; --- lexer --- (define (newline? c) (eqv? c #\newline)) @@ -1546,7 +1542,7 @@ (define (parse-do s) (with-bindings ((expect-end-current-line (input-port-line (ts:port s)))) - (without-whitespace-newline + (with-normal-context (let ((doargs (if (memv (peek-token s) '(#\newline #\;)) '() (parse-comma-separated s parse-range)))) diff --git a/test/syntax.jl b/test/syntax.jl index bc8b74df94ef5..0b966d481de42 100644 --- a/test/syntax.jl +++ b/test/syntax.jl @@ -1867,3 +1867,14 @@ end @test Meta.lower(Main, :(struct A; A() = new{Int}(); end)) == Expr(:error, "too many type parameters specified in \"new{...}\"") @test Meta.lower(Main, :(struct A{T, S}; A() = new{Int}(); end)) == Expr(:error, "too few type parameters specified in \"new{...}\"") + +# issue #32467 +let f = identity(identity() do + x = 0 + @inbounds for i = 1:2 + x += i + end + x + end) + @test f() == 3 +end