mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Only define @ and _NARG when they have values (#1073)
Fixes #1069 Co-authored-by: Eldred Habert <eldredhabert0@gmail.com>
This commit is contained in:
21
test/asm/undefined-builtins.asm
Normal file
21
test/asm/undefined-builtins.asm
Normal file
@@ -0,0 +1,21 @@
|
||||
; not inside a section
|
||||
assert !DEF(@)
|
||||
println @
|
||||
println "{@}?"
|
||||
|
||||
; not inside a macro
|
||||
assert !DEF(_NARG)
|
||||
println _NARG
|
||||
println "{_NARG}?"
|
||||
|
||||
SECTION "s", ROM0[$42]
|
||||
assert DEF(@)
|
||||
println @
|
||||
println "{@}!"
|
||||
|
||||
MACRO m
|
||||
assert DEF(_NARG)
|
||||
println _NARG
|
||||
println "{_NARG}!"
|
||||
ENDM
|
||||
m 1, 2, 3
|
||||
Reference in New Issue
Block a user