Merge branch 'refs/heads/main' into testsuites

This commit is contained in:
JonathanFleischmann 2024-06-30 21:16:21 +02:00
commit 0abcebb329

View File

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