M src/main/java/nl/grauw/glass/SourceBuilder.java +1 -1
@@ 40,7 40,7 @@ public class SourceBuilder {
private static final List<SourceFile> sourceFiles = new ArrayList<SourceFile>();
public SourceBuilder(List<Path> includePaths) {
- this(new GlobalScope(), includePaths);
+ this(new Scope(new GlobalScope()), includePaths);
}
private SourceBuilder(Scope scope, List<Path> includePaths) {
M src/test/java/nl/grauw/glass/SourceTest.java +7 -0
@@ 1117,6 1117,13 @@ public class SourceTest extends TestBase
));
}
+ @Test
+ public void testGlobalSymbolOverride() {
+ assertArrayEquals(b(0x18, 0xFE), assemble(
+ "end: jr end"
+ ));
+ }
+
@TempDir
static Path temporaryDirectory;