File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 324324 m parent-scope inarg))
325325
326326(define (resolve-expansion-vars- e env m parent-scope inarg)
327- (cond ((or (eq? e 'end) (eq? e 'ccall) (eq? e 'cglobal))
327+ (cond ((or (eq? e 'begin) (eq? e ' end) (eq? e 'ccall) (eq? e 'cglobal) (underscore-symbol? e ))
328328 e)
329329 ((symbol? e)
330330 (let ((a (assq e env)))
Original file line number Diff line number Diff line change @@ -2751,3 +2751,15 @@ end
27512751@test eval (:(x = $ (QuoteNode (Core. SlotNumber (1 ))))) == Core. SlotNumber (1 )
27522752@test_throws ErrorException (" syntax: SSAValue objects should not occur in an AST" ) eval (:(x = $ (Core. SSAValue (1 ))))
27532753@test_throws ErrorException (" syntax: Slot objects should not occur in an AST" ) eval (:(x = $ (Core. SlotNumber (1 ))))
2754+
2755+ macro m_underscore_hygiene ()
2756+ return :(_ = 1 )
2757+ end
2758+
2759+ @test @macroexpand (@m_underscore_hygiene ()) == :(_ = 1 )
2760+
2761+ macro m_begin_hygiene (a)
2762+ return :($ (esc (a))[begin ])
2763+ end
2764+
2765+ @test @m_begin_hygiene ([1 , 2 , 3 ]) == 1
You can’t perform that action at this time.
0 commit comments