mirror of
https://github.com/gbdev/rgbds.git
synced 2026-01-22 08:21:52 +00:00
Only restore parent context's \@ value if it had one defined (#1366)
This way, if a child context initializes `\@`, the parent won't reset it. And if the child context did not initialize `\@`, then resetting it would be redundant.
This commit is contained in:
27
test/asm/unique-id-include.asm
Normal file
27
test/asm/unique-id-include.asm
Normal file
@@ -0,0 +1,27 @@
|
||||
REPT 2
|
||||
println "Within REPT"
|
||||
INCLUDE "unique-id-include.inc"
|
||||
println "Outside INCLUDE: \@"
|
||||
ENDR
|
||||
|
||||
MACRO m1
|
||||
println "Within MACRO"
|
||||
INCLUDE "unique-id-include.inc"
|
||||
println "Outside INCLUDE: \@"
|
||||
ENDM
|
||||
m1
|
||||
|
||||
println
|
||||
|
||||
REPT 2
|
||||
println "Within REPT: \@"
|
||||
INCLUDE "unique-id-include.inc"
|
||||
println "Outside INCLUDE: \@"
|
||||
ENDR
|
||||
|
||||
MACRO m2
|
||||
println "Within MACRO: \@"
|
||||
INCLUDE "unique-id-include.inc"
|
||||
println "Outside INCLUDE: \@"
|
||||
ENDM
|
||||
m2
|
||||
Reference in New Issue
Block a user