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:
parent
492f11a91e
commit
2eeb54e16a
@ -19,12 +19,13 @@ public class TestStrucType {
|
|||||||
@org.junit.Test
|
@org.junit.Test
|
||||||
public void test() throws ClassNotFoundException, IOException {
|
public void test() throws ClassNotFoundException, IOException {
|
||||||
ArrayList<File> files = new ArrayList<>();
|
ArrayList<File> files = new ArrayList<>();
|
||||||
files.add(new File(rootDirectory + "testLocalVar.jav"));
|
// files.add(new File(rootDirectory + "testLocalVar.jav"));
|
||||||
files.add(new File(rootDirectory + "testCast.jav"));
|
// files.add(new File(rootDirectory + "testCast.jav"));
|
||||||
files.add(new File(rootDirectory + "testNew.jav"));
|
// files.add(new File(rootDirectory + "testNew.jav"));
|
||||||
files.add(new File(rootDirectory + "testFieldVar.jav"));
|
// files.add(new File(rootDirectory + "testFieldVar.jav"));
|
||||||
files.add(new File(rootDirectory + "testFieldMethod.jav"));
|
// files.add(new File(rootDirectory + "testFieldMethod.jav"));
|
||||||
files.add(new File(rootDirectory + "testPaperExample.jav"));
|
files.add(new File(rootDirectory + "testMethod.jav"));
|
||||||
|
// files.add(new File(rootDirectory + "testPaperExample.jav"));
|
||||||
JavaTXCompiler compiler = new JavaTXCompiler(files);
|
JavaTXCompiler compiler = new JavaTXCompiler(files);
|
||||||
for (File f : compiler.sourceFiles.keySet()) {
|
for (File f : compiler.sourceFiles.keySet()) {
|
||||||
String name = f.getName();
|
String name = f.getName();
|
||||||
|
@ -1,10 +1,14 @@
|
|||||||
package strucType.input;
|
package strucType.input;
|
||||||
|
import strucType.typedtestclasses.A;
|
||||||
|
|
||||||
class F
|
class F
|
||||||
{
|
{
|
||||||
f;
|
f;
|
||||||
|
A a;
|
||||||
|
|
||||||
mF() { return f; }
|
mF() { return f; }
|
||||||
|
|
||||||
|
mA() { return a; }
|
||||||
|
|
||||||
mX(x) { return x.f; }
|
mX(x) { return x.f; }
|
||||||
}
|
}
|
14
test/strucType/javFiles/testMethod.jav
Normal file
14
test/strucType/javFiles/testMethod.jav
Normal 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; }
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user