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

View File

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