Fix #333
Some checks failed
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 5m57s
Some checks failed
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 5m57s
This commit is contained in:
parent
2ded0c9044
commit
974582f7e5
11
resources/bytecode/javFiles/Bug333.jav
Normal file
11
resources/bytecode/javFiles/Bug333.jav
Normal file
@ -0,0 +1,11 @@
|
||||
import java.lang.String;
|
||||
|
||||
public class Bug333 {
|
||||
public static String Bar = "Bar";
|
||||
}
|
||||
|
||||
class Bar {
|
||||
public bar() {
|
||||
String s = Bug333.Bar;
|
||||
}
|
||||
}
|
@ -804,6 +804,7 @@ public class StatementGenerator {
|
||||
// Check for Classname:
|
||||
if (reg.contains(whole)) {
|
||||
receiver = generateStaticClassName(whole, offset);
|
||||
break;
|
||||
}
|
||||
whole += ".";
|
||||
}
|
||||
|
@ -1108,4 +1108,11 @@ public class TestComplete {
|
||||
var clazz = classFiles.get("Bug328");
|
||||
var instance = clazz.getDeclaredConstructor().newInstance();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBug333() throws Exception {
|
||||
var classFiles = generateClassFiles(new ByteArrayClassLoader(), "Bug333.jav");
|
||||
var clazz = classFiles.get("Bug333");
|
||||
var instance = clazz.getDeclaredConstructor().newInstance();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user