Alter tests a bit

This commit is contained in:
Daniel Holle 2023-06-15 16:31:50 +02:00
parent 9eb0dd1cf5
commit 4a18a81b33
2 changed files with 23 additions and 4 deletions

View File

@ -4,7 +4,7 @@ public class TestContraVariant {
var y3 = y2.snd();
var z;
y3 = z;
return new Pair(x,z);
return new Pair<>(x, z);
}
m(x, y) {
@ -12,6 +12,27 @@ public class TestContraVariant {
var x3 = x2.fst();
var 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;
}
}

View File

@ -295,7 +295,6 @@ public abstract class GenerateGenerics {
if (optMethod.isEmpty()) return;
var method2 = optMethod.get();
System.out.println("In: " + method.getName() + " Method: " + method2.getName());
System.out.println(simplifiedConstraints);
var generics = family(owner, method2);
// transitive and
@ -750,7 +749,6 @@ public abstract class GenerateGenerics {
for (var method : classOrInterface.getMethods()) {
family(classOrInterface, method);
}
System.out.println(familyOfMethods);
} while(!oldFamily.equals(familyOfMethods));
for (var method : classOrInterface.getMethods()) {