Skip to content

Commit a7cd97a

Browse files
JeffBezansonKristofferC
authored andcommitted
mark inbounds and loopinfo as quoted during lowering (#34397)
1 parent cb46917 commit a7cd97a

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
@@ -1986,3 +1986,11 @@ i0xb23hG = @id_for_kwarg let x = 1
19861986
end
19871987
@test i0xb23hG() == 2
19881988
@test i0xb23hG(x=10) == 10
1989+
1990+
@test @eval let
1991+
(z,)->begin
1992+
$(Expr(:inbounds, true))
1993+
$(Expr(:inbounds, :pop))
1994+
end
1995+
pop = 1
1996+
end == 1

0 commit comments

Comments
 (0)