Fix recursive packages
All checks were successful
Build and Test with Maven / Build-and-test-with-Maven (push) Successful in 2m25s

This commit is contained in:
Daniel Holle 2024-03-14 15:23:31 +01:00
parent ebd6a00a39
commit 66c8c307b0
3 changed files with 5 additions and 1 deletions

View File

@ -668,6 +668,7 @@ public class JavaTXCompiler {
public boolean loadJavaTXClass(JavaClassName name) {
var file = findFileForClass(name);
if (file != null) {
if (classRegistry.contains(name)) return true;
try {
var tree = JavaTXParser.parse(file);
classRegistry.addName(name.toString(), 0); // TODO This gets overwritten later, is it bad if we don't know this right away?

View File

@ -55,6 +55,10 @@ public class JavaClassRegistry {
return existingClasses.containsKey(new JavaClassName(whole));
}
public boolean contains(JavaClassName name) {
return existingClasses.containsKey(name);
}
public int getNumberOfGenerics(String name) {
return existingClasses.get(new JavaClassName(name));
}

View File

@ -22,7 +22,6 @@ public class TestPackages {
cmp.generateBytecode(bytecodeDirectory);
}
@Ignore("FIXME")
@Test
public void testPackagesCircular() throws Exception {
var cmp = new JavaTXCompiler(