Bug 108 gefixt

This commit is contained in:
Fayez Abu Alia 2018-09-19 13:05:00 +02:00
parent 5768783828
commit aeb8bb92ed
4 changed files with 15 additions and 10 deletions

View File

@ -178,7 +178,6 @@ public class Signature {
if(hasTPHs(ref))
createSignatureForParameterizedType(ref);
System.out.println("HAS WC = " + hasWC(ref));
if(hasWC(ref))
createSigForParamTypeWithWC(ref);
}
@ -234,7 +233,6 @@ public class Signature {
if(p instanceof WildcardType) {
if(((WildcardType) p).getInnerType() instanceof GenericRefType) {
String name = new TypeToSignature().visit((GenericRefType)((WildcardType) p).getInnerType());
System.out.println("NAME WC = " + name);
if(!genericsAndBoundsMethod.containsKey(name) && !genericsAndBounds.containsKey(name)) {
sw.visitFormalTypeParameter(name);
sw.visitClassBound().visitClassType(Type.getInternalName(Object.class));

View File

@ -34,9 +34,9 @@ public class TypeToSignature implements TypeVisitor<String> {
// params += "L"+param.toString().replace(".", "/");
// }
params += param.acceptTV(new TypeToSignature());
if(!(param instanceof RefType))
if(param instanceof TypePlaceholder)
params += ";";
// if(it.hasNext())params += ";";
}
params += ">";
}

View File

@ -36,8 +36,9 @@ public class Tph5Test {
@Test
public void test() throws Exception {
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.class);
Method m = classToTest.getDeclaredMethod("m", Object.class, Object.class);
// Object result = m.invoke(instanceOfClass, "xx",2,3);
//assertEquals(2,result);
}

View File

@ -1,7 +1,13 @@
public class Tph5 {
m(a,b,c){
a = c;
b = c;
return a;
// m(a,b,c){
// a = c;
// b = c;
// return a;
// }
m(x,y){
x = m2(y);
}
m2(y) { return y; }
}