diff --git a/compiler/test/TestCompilerOnImportsAndIncludes.kt b/compiler/test/TestCompilerOnImportsAndIncludes.kt index a68ad9c91..b19ec6a86 100644 --- a/compiler/test/TestCompilerOnImportsAndIncludes.kt +++ b/compiler/test/TestCompilerOnImportsAndIncludes.kt @@ -67,7 +67,7 @@ class TestCompilerOnImportsAndIncludes: FunSpec({ val id1 = (args[1] as AddressOf).identifier val lbl1 = id1.targetStatement(program) as Label lbl1.name shouldBe "foo_bar" - lbl1.definingScope.name shouldBe "start" + lbl1.definingScope.name shouldBe "main" } } diff --git a/compiler/test/fixtures/asmIncludeFromSameFolder.p8 b/compiler/test/fixtures/asmIncludeFromSameFolder.p8 index 8c5617d77..9a8dd11f9 100644 --- a/compiler/test/fixtures/asmIncludeFromSameFolder.p8 +++ b/compiler/test/fixtures/asmIncludeFromSameFolder.p8 @@ -1,13 +1,16 @@ %import textio main { str myBar = "main.bar" -;foo_bar: -; %asminclude "foo_bar.asm" ; TODO: should be accessible from inside start() but give assembler error. See github issue #62 + +foo_bar: + %asminclude "foo_bar.asm" + sub start() { txt.print(myBar) txt.print(&foo_bar) return -foo_bar: + +foo_bar_inside_start: %asminclude "foo_bar.asm" } }