Endabgabe #20

Merged
i22035 merged 137 commits from Endabgabe into main 2024-07-05 11:59:47 +00:00
2 changed files with 13 additions and 10 deletions
Showing only changes of commit 2e3a7850a4 - Show all commits

View File

@ -614,7 +614,7 @@ public class SemanticAnalyzer implements SemanticVisitor {
start++; start++;
} }
} }
if(context.getClasses().get(memberAccessNode.identifiers.getFirst()) != null){ if(context.getClasses().get(memberAccessNode.identifiers.getFirst()) == null){
memberAccessNode.identifiers.addFirst(currentClass.identifier); memberAccessNode.identifiers.addFirst(currentClass.identifier);
start++; start++;
} }

View File

@ -1,13 +1,16 @@
public class Klasse1 { public class Compiler {
public int test; Node node;
public int add(int i, int j) {
public int test1() { node = new Node();
test = 5; node.x = 1;
return 1; return i+j;
} }
}
public void test2() {
int testInt; public class Node {
testInt = this.test1(); public int x;
public void main() {
Compiler compiler = new Compiler();
int i = compiler.add(5, 8);
} }
} }