forked from JavaTX/JavaCompilerCore
- IdentityFieldTest erstellt
This commit is contained in:
parent
5b07d58093
commit
098cafac00
@ -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");
|
||||
}
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
3
test/bytecode/IdentityField.jav
Normal file
3
test/bytecode/IdentityField.jav
Normal file
@ -0,0 +1,3 @@
|
||||
class Id {
|
||||
<GPM, FNF extends GPM> Fun1<? extends GPM, ? super FNF> op = (x) -> x;
|
||||
}
|
14
test/bytecode/IdentityFieldTest.java
Normal file
14
test/bytecode/IdentityFieldTest.java
Normal 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);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user