- IdentityFieldTest erstellt

This commit is contained in:
Enrico Schrödter 2016-03-31 08:52:23 +02:00
parent 5b07d58093
commit 098cafac00
4 changed files with 20 additions and 5 deletions

View File

@ -235,7 +235,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");
}

View File

@ -877,11 +877,9 @@ public class RefType extends ObjectType implements IMatchable
@Override
public String getDescription(ClassGenerator cg, TypeinferenceResultSet rs) {
return getBytecodeSignature(cg, rs);
String signature = getBytecodeSignature(cg, rs);
return signature.substring(1, signature.length()-1);
}
}
// ino.end

View File

@ -0,0 +1,3 @@
class Id {
<GPM, FNF extends GPM> Fun1<? extends GPM, ? super FNF> op = (x) -> x;
}

View File

@ -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);
}
}