missing thisClass

This commit is contained in:
Krauß, Josefine 2024-06-28 19:32:44 +02:00
parent f6bb836ee0
commit 4bc38c0ff9

View File

@ -5,7 +5,9 @@ import TypeCheck.TypeCheckException;
import TypeCheck.TypeCheckHelper;
import TypeCheck.TypeCheckResult;
import abstractSyntaxTree.Expression.IExpression;
import abstractSyntaxTree.Expression.LocalVarIdentifier;
import abstractSyntaxTree.Parameter.ParameterList;
import abstractSyntaxTree.StatementExpression.AssignStatementExpression;
import abstractSyntaxTree.StatementExpression.MethodCallStatementExpression;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
@ -36,6 +38,9 @@ public class LocalVarDecl extends AbstractType implements IStatement{
methodCall.thisClass = this.thisClass;
}
if(expression instanceof LocalVarIdentifier localVarIdentifier){
localVarIdentifier.thisClass = thisClass;
}
expression.typeCheck(methodContext, typeContext, localVars);
}