mirror of
https://github.com/JonathanFleischmann/CompilerULTIMATE.git
synced 2024-12-27 00:48:04 +00:00
Catch retrieving the field variable without this
This commit is contained in:
parent
b4fd003f8e
commit
27d56c470c
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user