shithub: rgbds

Download patch

ref: a53d795361fc63a07e54aa23d104a9d073370734
parent: 2e60c4dd2e980982f993822ba65c7df10e548239
author: Ben10do <[email protected]>
date: Mon Jun 12 15:50:02 EDT 2017

Add tests for explicit definitions of local labels

These check that “Parent.child” may be used in place of “.child”, and that “WrongParent.child” may not be used in the scope of “Parent”.

--- /dev/null
+++ b/test/asm/local-wrong-parent.asm
@@ -1,0 +1,6 @@
+SECTION "sec", ROM0
+
+Parent:
+	db 0
+WrongParent.child
+	db 0
--- /dev/null
+++ b/test/asm/local-wrong-parent.out
@@ -1,0 +1,3 @@
+ERROR: local-wrong-parent.asm(5):
+	Not currently in the scope of 'WrongParent'
+error: Assembly aborted in pass 1 (1 errors)!
--- /dev/null
+++ b/test/asm/remote-local-explicit.asm
@@ -1,0 +1,7 @@
+SECTION "sec", ROM0
+
+Parent:
+Parent.child::
+	db 0
+NotParent:
+	dw Parent.child