mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Merge pull request #604 from NieDzejkob/narg-overwrite
Don't overwrite symbol when it's not allowed
This commit is contained in:
@@ -409,6 +409,7 @@ struct Symbol *sym_AddSet(char const *symName, int32_t value)
|
||||
symName, sym->type == SYM_LABEL ? "label" : "constant");
|
||||
dumpFilename(sym);
|
||||
putc('\n', stderr);
|
||||
return sym;
|
||||
} else {
|
||||
/* TODO: can the scope be incorrect when taking over refs? */
|
||||
updateSymbolFilename(sym);
|
||||
|
||||
2
test/asm/narg-overwrite.asm
Normal file
2
test/asm/narg-overwrite.asm
Normal file
@@ -0,0 +1,2 @@
|
||||
_NARG = 0
|
||||
_NARG = 0
|
||||
5
test/asm/narg-overwrite.err
Normal file
5
test/asm/narg-overwrite.err
Normal file
@@ -0,0 +1,5 @@
|
||||
ERROR: narg-overwrite.asm(1):
|
||||
'_NARG' already defined as constant at <builtin>
|
||||
ERROR: narg-overwrite.asm(2):
|
||||
'_NARG' already defined as constant at <builtin>
|
||||
error: Assembly aborted (2 errors)!
|
||||
0
test/asm/narg-overwrite.out
Normal file
0
test/asm/narg-overwrite.out
Normal file
Reference in New Issue
Block a user