Merge branch 'refs/heads/testsuites'

# Conflicts:
#	src/main/java/de/maishai/StatementGenerator.java
This commit is contained in:
JonathanFleischmann 2024-06-30 22:50:17 +02:00
commit 7dce97a534
2 changed files with 1 additions and 2 deletions

View File

@ -105,7 +105,6 @@ public class StatementGenerator extends DecafBaseVisitor<List<Statement>> {
Expression recipient = null;
if (fieldIdContext.recipient() != null) {
recipient = ExpressionGenerator.generateRecursiveOwnerChain(fieldIdContext.recipient(), null, isField);
}
if (recipient == null) {
return new FieldVarAccess(isField, null, fieldIdContext.id().IDENTIFIER().getText());

View File

@ -51,7 +51,7 @@ public class TypedFieldVarAccess implements TypedExpression {
TypedClass currentClass = typedProgram.getCurrentClass();
if (currentClass.isThereField(name)) {
throw new RuntimeException("Field Variable " + name + " should be used with `this´");
return checkTypeField(typedProgram);
} else if (currentClass.isMethodOfCurrentClass(name)) {
type = currentClass.getMethodType(name);
return type;