Alter tests a bit
This commit is contained in:
parent
9eb0dd1cf5
commit
4a18a81b33
@ -4,7 +4,7 @@ public class TestContraVariant {
|
|||||||
var y3 = y2.snd();
|
var y3 = y2.snd();
|
||||||
var z;
|
var z;
|
||||||
y3 = z;
|
y3 = z;
|
||||||
return new Pair(x,z);
|
return new Pair<>(x, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
m(x, y) {
|
m(x, y) {
|
||||||
@ -12,6 +12,27 @@ public class TestContraVariant {
|
|||||||
var x3 = x2.fst();
|
var x3 = x2.fst();
|
||||||
var z;
|
var z;
|
||||||
x3 = z;
|
x3 = z;
|
||||||
return new Pair(z, y);
|
return new Pair<>(z, y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Pair<T, U> {
|
||||||
|
public T x;
|
||||||
|
public U y;
|
||||||
|
|
||||||
|
public Pair() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public Pair(T var1, U var2) {
|
||||||
|
x = var1;
|
||||||
|
y = var2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public T fst() {
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
|
||||||
|
public U snd() {
|
||||||
|
return y;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -295,7 +295,6 @@ public abstract class GenerateGenerics {
|
|||||||
if (optMethod.isEmpty()) return;
|
if (optMethod.isEmpty()) return;
|
||||||
var method2 = optMethod.get();
|
var method2 = optMethod.get();
|
||||||
System.out.println("In: " + method.getName() + " Method: " + method2.getName());
|
System.out.println("In: " + method.getName() + " Method: " + method2.getName());
|
||||||
System.out.println(simplifiedConstraints);
|
|
||||||
var generics = family(owner, method2);
|
var generics = family(owner, method2);
|
||||||
|
|
||||||
// transitive and
|
// transitive and
|
||||||
@ -750,7 +749,6 @@ public abstract class GenerateGenerics {
|
|||||||
for (var method : classOrInterface.getMethods()) {
|
for (var method : classOrInterface.getMethods()) {
|
||||||
family(classOrInterface, method);
|
family(classOrInterface, method);
|
||||||
}
|
}
|
||||||
System.out.println(familyOfMethods);
|
|
||||||
} while(!oldFamily.equals(familyOfMethods));
|
} while(!oldFamily.equals(familyOfMethods));
|
||||||
|
|
||||||
for (var method : classOrInterface.getMethods()) {
|
for (var method : classOrInterface.getMethods()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user