TypeExpr angepasst bei method und fieldvar um den receiver This erkennen und verarbeiten zu koennen, Typen in Constraints werden mit den inferredTypes abgeleitet

This commit is contained in:
Aldaron7 2018-03-16 22:19:06 +01:00
parent 492f11a91e
commit 2eeb54e16a
3 changed files with 25 additions and 6 deletions

View File

@ -19,12 +19,13 @@ public class TestStrucType {
@org.junit.Test
public void test() throws ClassNotFoundException, IOException {
ArrayList<File> files = new ArrayList<>();
files.add(new File(rootDirectory + "testLocalVar.jav"));
files.add(new File(rootDirectory + "testCast.jav"));
files.add(new File(rootDirectory + "testNew.jav"));
files.add(new File(rootDirectory + "testFieldVar.jav"));
files.add(new File(rootDirectory + "testFieldMethod.jav"));
files.add(new File(rootDirectory + "testPaperExample.jav"));
// files.add(new File(rootDirectory + "testLocalVar.jav"));
// files.add(new File(rootDirectory + "testCast.jav"));
// files.add(new File(rootDirectory + "testNew.jav"));
// files.add(new File(rootDirectory + "testFieldVar.jav"));
// files.add(new File(rootDirectory + "testFieldMethod.jav"));
files.add(new File(rootDirectory + "testMethod.jav"));
// files.add(new File(rootDirectory + "testPaperExample.jav"));
JavaTXCompiler compiler = new JavaTXCompiler(files);
for (File f : compiler.sourceFiles.keySet()) {
String name = f.getName();

View File

@ -1,10 +1,14 @@
package strucType.input;
import strucType.typedtestclasses.A;
class F
{
f;
A a;
mF() { return f; }
mA() { return a; }
mX(x) { return x.f; }
}

View File

@ -0,0 +1,14 @@
package strucType.input;
import strucType.typedtestclasses.A;
import strucType.typedtestclasses.A2;
class M
{
mM(x) { return mA(x); }
A mA(x) { return x.getA(); }
A2 m(A a) { return a; }
}