Catch retrieving the field variable without this

This commit is contained in:
ahmad 2024-06-30 21:10:49 +02:00
parent 122b165410
commit 0bfd9381f7

View File

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