mirror of
https://github.com/JonathanFleischmann/CompilerULTIMATE.git
synced 2024-12-28 08:48:03 +00:00
Catch retrieving the field variable without this
This commit is contained in:
parent
122b165410
commit
0bfd9381f7
@ -51,7 +51,7 @@ public class TypedFieldVarAccess implements TypedExpression {
|
|||||||
TypedClass currentClass = typedProgram.getCurrentClass();
|
TypedClass currentClass = typedProgram.getCurrentClass();
|
||||||
|
|
||||||
if (currentClass.isThereField(name)) {
|
if (currentClass.isThereField(name)) {
|
||||||
return checkTypeField(typedProgram);
|
throw new RuntimeException("Field Variable " + name + " should be used with `this´");
|
||||||
} else if (currentClass.isMethodOfCurrentClass(name)) {
|
} else if (currentClass.isMethodOfCurrentClass(name)) {
|
||||||
type = currentClass.getMethodType(name);
|
type = currentClass.getMethodType(name);
|
||||||
return type;
|
return type;
|
||||||
|
Loading…
Reference in New Issue
Block a user