modified: ../../../../main/java/de/dhbwstuttgart/parser/SyntaxTreeGenerator/StatementGenerator.java
this wird nicht als Field betrachtet new file: ../../javFiles/packageTest/Pair2.jav new file: ../../javFiles/packageTest/de/test/Pair.jav
This commit is contained in:
parent
33d6adf899
commit
0aab2d9f53
@ -272,8 +272,10 @@ public class StatementGenerator {
|
|||||||
whole+=".";
|
whole+=".";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(parts.length < 2){
|
if(parts.length < 2 || parts[0].contentEquals("this") ){
|
||||||
receiver = new This(offset);
|
receiver = new This(offset);
|
||||||
|
} else if (parts[0].contentEquals("super")) {
|
||||||
|
receiver = new Super(offset);
|
||||||
}else if(receiver == null){ //Handelt es sich um keinen Statischen Klassennamen:
|
}else if(receiver == null){ //Handelt es sich um keinen Statischen Klassennamen:
|
||||||
String part = expression.substring(0,expression.length() - (1 + parts[parts.length-1].length()));
|
String part = expression.substring(0,expression.length() - (1 + parts[parts.length-1].length()));
|
||||||
receiver = generateLocalOrFieldVarOrClassName(part, offset);
|
receiver = generateLocalOrFieldVarOrClassName(part, offset);
|
||||||
|
14
src/test/resources/javFiles/packageTest/Pair2.jav
Normal file
14
src/test/resources/javFiles/packageTest/Pair2.jav
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import de.test.Pair;
|
||||||
|
|
||||||
|
class Pairs {
|
||||||
|
setfst(fst) {
|
||||||
|
return new Pair<>(snd, fst);
|
||||||
|
}
|
||||||
|
|
||||||
|
swap () {
|
||||||
|
return new Pair<> (snd, fst); }
|
||||||
|
|
||||||
|
polyrec(p) {
|
||||||
|
return polyrec (p.swap());
|
||||||
|
}
|
||||||
|
}
|
12
src/test/resources/javFiles/packageTest/de/test/Pair.jav
Normal file
12
src/test/resources/javFiles/packageTest/de/test/Pair.jav
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
package de.test;
|
||||||
|
|
||||||
|
class Pair {
|
||||||
|
fst;
|
||||||
|
snd;
|
||||||
|
|
||||||
|
Pair(fst, snd) {
|
||||||
|
this.fst = fst;
|
||||||
|
this.snd = snd;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user