Compare commits
2 Commits
d925a3258c
...
9b8155ebab
Author | SHA1 | Date | |
---|---|---|---|
|
9b8155ebab | ||
|
2e3a7850a4 |
@ -614,7 +614,7 @@ public class SemanticAnalyzer implements SemanticVisitor {
|
||||
start++;
|
||||
}
|
||||
}
|
||||
if(context.getClasses().get(memberAccessNode.identifiers.getFirst()) != null){
|
||||
if(context.getClasses().get(memberAccessNode.identifiers.getFirst()) == null){
|
||||
memberAccessNode.identifiers.addFirst(currentClass.identifier);
|
||||
start++;
|
||||
}
|
||||
@ -635,7 +635,8 @@ public class SemanticAnalyzer implements SemanticVisitor {
|
||||
} else {
|
||||
if (currentType instanceof ReferenceType reference) {
|
||||
var currentTypeClass = context.getClass(reference.getIdentifier());
|
||||
|
||||
memberAccessNode.identifiers.add(i, reference.getIdentifier());
|
||||
i++;
|
||||
var currentField = currentTypeClass.getField(s);
|
||||
if (currentField.getAccessModifier().accessType == EnumAccessModifierNode.PUBLIC) {
|
||||
currentType = currentField.getType();
|
||||
|
@ -1,13 +1,16 @@
|
||||
public class Klasse1 {
|
||||
public int test;
|
||||
|
||||
public int test1() {
|
||||
test = 5;
|
||||
return 1;
|
||||
public class Compiler {
|
||||
Node node;
|
||||
public int add(int i, int j) {
|
||||
node = new Node();
|
||||
node.x = 1;
|
||||
return i+j;
|
||||
}
|
||||
}
|
||||
|
||||
public void test2() {
|
||||
int testInt;
|
||||
testInt = this.test1();
|
||||
public class Node {
|
||||
public int x;
|
||||
public void main() {
|
||||
Compiler compiler = new Compiler();
|
||||
int i = compiler.add(5, 8);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user