diff --git a/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java b/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java index c7ced871..26b0c2cf 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java @@ -234,7 +234,7 @@ public class GenericTypeVar extends ObjectType @Override public org.apache.commons.bcel6.generic.Type getBytecodeType(ClassGenerator cg, TypeinferenceResultSet rs) { // TODO Bytecode - return null; + return org.apache.commons.bcel6.generic.Type.getType(getSignatureType(null));// new org.apache.commons.bcel6.generic.ObjectType("Object"); } diff --git a/test/bytecode/IdentityField.jav b/test/bytecode/IdentityField.jav new file mode 100644 index 00000000..29781431 --- /dev/null +++ b/test/bytecode/IdentityField.jav @@ -0,0 +1,3 @@ +class Id { + Fun1 op = (x) -> x; +} \ No newline at end of file diff --git a/test/bytecode/IdentityFieldTest.java b/test/bytecode/IdentityFieldTest.java new file mode 100644 index 00000000..e50b001e --- /dev/null +++ b/test/bytecode/IdentityFieldTest.java @@ -0,0 +1,14 @@ +package bytecode; + +import org.junit.Test; + +public class IdentityFieldTest { + public final static String rootDirectory = System.getProperty("user.dir")+"/test/bytecode/"; + public final static String testFile = "IdentityField.jav"; + public final static String outputFile = "IdentityField.class"; + + @Test + public void test() { + SingleClassTester.compileToBytecode(rootDirectory+testFile, rootDirectory+outputFile); + } +}