Skip to content

Commit adb7c7e

Browse files
JeffBezansonKristofferC
authored andcommitted
mark inbounds and loopinfo as quoted during lowering (#34397)
(cherry picked from commit a7cd97a)
1 parent fe8aeb8 commit adb7c7e

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/ast.scm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,8 @@
273273

274274
;; predicates and accessors
275275

276-
(define (quoted? e) (memq (car e) '(quote top core globalref outerref line break inert meta)))
276+
(define (quoted? e)
277+
(memq (car e) '(quote top core globalref outerref line break inert meta inbounds loopinfo)))
277278
(define (quotify e) `',e)
278279
(define (unquote e)
279280
(if (and (pair? e) (memq (car e) '(quote inert)))

test/syntax.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1971,3 +1971,11 @@ end
19711971
# issue #33987
19721972
f33987(args::(Vararg{Any, N} where N); kwargs...) = args
19731973
@test f33987(1,2,3) === (1,2,3)
1974+
1975+
@test @eval let
1976+
(z,)->begin
1977+
$(Expr(:inbounds, true))
1978+
$(Expr(:inbounds, :pop))
1979+
end
1980+
pop = 1
1981+
end == 1

0 commit comments

Comments
 (0)