diff --git a/resources/bytecode/javFiles/Bug125.jav b/resources/bytecode/javFiles/Bug125.jav new file mode 100644 index 00000000..26474ae2 --- /dev/null +++ b/resources/bytecode/javFiles/Bug125.jav @@ -0,0 +1,16 @@ +import java.lang.Boolean; +import java.lang.Integer; +import java.lang.String; +import java.util.List; +import java.util.LinkedList; +import java.util.ArrayList; + +class Bug125 { + static ArrayList works = new ArrayList<>(); + static List fails = new ArrayList<>(); + + void main() { + works.toString(); + fails.toString(); + } +} diff --git a/src/test/java/TestComplete.java b/src/test/java/TestComplete.java index e188ee37..572b6a67 100644 --- a/src/test/java/TestComplete.java +++ b/src/test/java/TestComplete.java @@ -855,4 +855,11 @@ public class TestComplete { var clazz = classFiles.get("Bug123"); var instance = clazz.getDeclaredConstructor().newInstance(); } + + @Test + public void testBug125() throws Exception { + var classFiles = generateClassFiles(new ByteArrayClassLoader(), "Bug125.jav"); + var clazz = classFiles.get("Bug125"); + var instance = clazz.getDeclaredConstructor().newInstance(); + } }