Compare commits
No commits in common. "9b8155ebab61ce6ad53930d7d3035e1ac584f491" and "d925a3258c9280460b255e5388fa29b270f7009d" have entirely different histories.
9b8155ebab
...
d925a3258c
@ -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++;
|
||||||
}
|
}
|
||||||
@ -635,8 +635,7 @@ public class SemanticAnalyzer implements SemanticVisitor {
|
|||||||
} else {
|
} else {
|
||||||
if (currentType instanceof ReferenceType reference) {
|
if (currentType instanceof ReferenceType reference) {
|
||||||
var currentTypeClass = context.getClass(reference.getIdentifier());
|
var currentTypeClass = context.getClass(reference.getIdentifier());
|
||||||
memberAccessNode.identifiers.add(i, reference.getIdentifier());
|
|
||||||
i++;
|
|
||||||
var currentField = currentTypeClass.getField(s);
|
var currentField = currentTypeClass.getField(s);
|
||||||
if (currentField.getAccessModifier().accessType == EnumAccessModifierNode.PUBLIC) {
|
if (currentField.getAccessModifier().accessType == EnumAccessModifierNode.PUBLIC) {
|
||||||
currentType = currentField.getType();
|
currentType = currentField.getType();
|
||||||
|
@ -1,16 +1,13 @@
|
|||||||
public class Compiler {
|
public class Klasse1 {
|
||||||
Node node;
|
public int test;
|
||||||
public int add(int i, int j) {
|
|
||||||
node = new Node();
|
|
||||||
node.x = 1;
|
|
||||||
return i+j;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class Node {
|
public int test1() {
|
||||||
public int x;
|
test = 5;
|
||||||
public void main() {
|
return 1;
|
||||||
Compiler compiler = new Compiler();
|
}
|
||||||
int i = compiler.add(5, 8);
|
|
||||||
|
public void test2() {
|
||||||
|
int testInt;
|
||||||
|
testInt = this.test1();
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user