Consider environment of type variables in method call

This commit is contained in:
Victorious3 2023-01-23 13:56:21 +01:00
parent 8aa67594d9
commit 69bdb4aa5b
2 changed files with 12 additions and 1 deletions

View File

@ -1,6 +1,6 @@
import java.util.Vector;
import java.lang.Integer;
import java.lang.String;
public class VectorAdd {
vectorAdd(v1, v2) {
@ -13,4 +13,14 @@ public class VectorAdd {
}
return erg;
}
m(x, y, z) {
x = new Vector<Integer>();
y = new Vector<String>();
x.add(1);
y.add("2");
//Integer i = x.elementAt(0);
//String s = y.elementAt(0);
return z.addAll(x);
}
}

View File

@ -244,6 +244,7 @@ public class ASTToTargetAST {
if (!(pair2.right.equals(tph2) && pair2.left.equals(type)))
continue;
if (tph.equals(tph2)) continue;
if (!T1s.contains(tph) || !tph2.equals(T2)) continue;
var newPair = new PairTPHsmallerTPH(tph, tph2);
newPairs.add(newPair);