Add typeCheck to newStmt in TypedExpressionHelp

This commit is contained in:
ahmad 2024-05-11 18:27:55 +02:00
parent ba97c04414
commit d5879e6539

@ -41,7 +41,9 @@ public class TypedExpressionHelp {
return typedMethodCall;
}
else if (expression instanceof New newStmt) {
return new TypedNew(localVar, clas, newStmt);
TypedNew typedNew = new TypedNew(localVar, clas, newStmt);
typedNew.typeCheck(localVar, clas);
return typedNew;
}
else if (expression instanceof Unary unary) {
TypedUnary typedUnary = new TypedUnary(localVar, clas, unary);