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 479ba13d4c3ca..87e91146d4f9f 100644 --- a/test/syntax.jl +++ b/test/syntax.jl @@ -1875,3 +1875,14 @@ x32499 = begin S32499(x=2) end @test x32499 == 2 + +# issue #32467 +let f = identity(identity() do + x = 0 + @inbounds for i = 1:2 + x += i + end + x + end) + @test f() == 3 +end