Fixed MemberAccess Type
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run

This commit is contained in:
i22035 2024-07-04 22:38:39 +02:00
parent 4bee432294
commit 240913d422
2 changed files with 1 additions and 9 deletions

View File

@ -624,7 +624,6 @@ public class SemanticAnalyzer implements SemanticVisitor {
if (currentType == null) { if (currentType == null) {
if (currentScope.getLocalVar(s) != null) { if (currentScope.getLocalVar(s) != null) {
currentType = currentScope.getLocalVar(s); currentType = currentScope.getLocalVar(s);
} else if (currentFields.get(s) != null) { } else if (currentFields.get(s) != null) {
currentType = currentFields.get(s); currentType = currentFields.get(s);
} else { } else {
@ -648,7 +647,7 @@ public class SemanticAnalyzer implements SemanticVisitor {
} }
} }
memberAccessNode.setTypeNode(currentType);
return new TypeCheckResult(true, currentType); return new TypeCheckResult(true, currentType);
} }

View File

@ -9,10 +9,3 @@ public class Person {
return this.age; return this.age;
} }
} }
public class Person2 {
public void greet() {
Person person = new Person(10);
person.getAge();
}
}