forked from JavaTX/JavaCompilerCore
Bug 108 gefixt
This commit is contained in:
parent
5768783828
commit
aeb8bb92ed
@ -178,7 +178,6 @@ public class Signature {
|
|||||||
if(hasTPHs(ref))
|
if(hasTPHs(ref))
|
||||||
createSignatureForParameterizedType(ref);
|
createSignatureForParameterizedType(ref);
|
||||||
|
|
||||||
System.out.println("HAS WC = " + hasWC(ref));
|
|
||||||
if(hasWC(ref))
|
if(hasWC(ref))
|
||||||
createSigForParamTypeWithWC(ref);
|
createSigForParamTypeWithWC(ref);
|
||||||
}
|
}
|
||||||
@ -234,7 +233,6 @@ public class Signature {
|
|||||||
if(p instanceof WildcardType) {
|
if(p instanceof WildcardType) {
|
||||||
if(((WildcardType) p).getInnerType() instanceof GenericRefType) {
|
if(((WildcardType) p).getInnerType() instanceof GenericRefType) {
|
||||||
String name = new TypeToSignature().visit((GenericRefType)((WildcardType) p).getInnerType());
|
String name = new TypeToSignature().visit((GenericRefType)((WildcardType) p).getInnerType());
|
||||||
System.out.println("NAME WC = " + name);
|
|
||||||
if(!genericsAndBoundsMethod.containsKey(name) && !genericsAndBounds.containsKey(name)) {
|
if(!genericsAndBoundsMethod.containsKey(name) && !genericsAndBounds.containsKey(name)) {
|
||||||
sw.visitFormalTypeParameter(name);
|
sw.visitFormalTypeParameter(name);
|
||||||
sw.visitClassBound().visitClassType(Type.getInternalName(Object.class));
|
sw.visitClassBound().visitClassType(Type.getInternalName(Object.class));
|
||||||
|
@ -34,9 +34,9 @@ public class TypeToSignature implements TypeVisitor<String> {
|
|||||||
// params += "L"+param.toString().replace(".", "/");
|
// params += "L"+param.toString().replace(".", "/");
|
||||||
// }
|
// }
|
||||||
params += param.acceptTV(new TypeToSignature());
|
params += param.acceptTV(new TypeToSignature());
|
||||||
if(!(param instanceof RefType))
|
|
||||||
|
if(param instanceof TypePlaceholder)
|
||||||
params += ";";
|
params += ";";
|
||||||
// if(it.hasNext())params += ";";
|
|
||||||
}
|
}
|
||||||
params += ">";
|
params += ">";
|
||||||
}
|
}
|
||||||
|
@ -36,8 +36,9 @@ public class Tph5Test {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void test() throws Exception {
|
public void test() throws Exception {
|
||||||
Method m = classToTest.getDeclaredMethod("m", Object.class, Object.class, Object.class);
|
// Method m = classToTest.getDeclaredMethod("m", Object.class, Object.class, Object.class);
|
||||||
Object result = m.invoke(instanceOfClass, "xx",2,3);
|
Method m = classToTest.getDeclaredMethod("m", Object.class, Object.class);
|
||||||
|
// Object result = m.invoke(instanceOfClass, "xx",2,3);
|
||||||
|
|
||||||
//assertEquals(2,result);
|
//assertEquals(2,result);
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,13 @@
|
|||||||
public class Tph5 {
|
public class Tph5 {
|
||||||
m(a,b,c){
|
// m(a,b,c){
|
||||||
a = c;
|
// a = c;
|
||||||
b = c;
|
// b = c;
|
||||||
return a;
|
// return a;
|
||||||
|
// }
|
||||||
|
|
||||||
|
m(x,y){
|
||||||
|
x = m2(y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m2(y) { return y; }
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user