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 324
324
m parent-scope inarg))
325
325
326
326
(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 ))
328
328
e)
329
329
((symbol? e)
330
330
(let ((a (assq e env)))
Original file line number Diff line number Diff line change @@ -2674,3 +2674,15 @@ end == 4
2674
2674
@test ncalls_in_lowered (:(.! (1 .< A .< 2 )), GlobalRef (Base, :materialize )) == 1
2675
2675
@test ncalls_in_lowered (:((.! )(1 .< A .< 2 )), GlobalRef (Base, :materialize )) == 1
2676
2676
end
2677
+
2678
+ macro m_underscore_hygiene ()
2679
+ return :(_ = 1 )
2680
+ end
2681
+
2682
+ @test @macroexpand (@m_underscore_hygiene ()) == :(_ = 1 )
2683
+
2684
+ macro m_begin_hygiene (a)
2685
+ return :($ (esc (a))[begin ])
2686
+ end
2687
+
2688
+ @test @m_begin_hygiene ([1 , 2 , 3 ]) == 1
You can’t perform that action at this time.
0 commit comments