Compare commits

..

4 Commits

Author SHA1 Message Date
Pluemicke Martin
9dd6c1610a geändert: S2017_Jan-Elric_Neumann.pdf 2017-09-04 09:28:53 +02:00
Pluemicke Martin
66bbf9d52d neue Datei: S2017_Jan-Elric_Neumann.pdf
neue Datei:   ../../git_pull_origin_bigRefactoring
	geändert:   ../../test/typeinference/JavaTXCompilerTest.java
2017-09-04 09:26:02 +02:00
JanUlrich
8bff427c5c merge 2017-06-30 13:49:53 +02:00
JanUlrich
fc6040da39 Fehler in TYPE beseitigen 2017-06-30 13:48:59 +02:00
5 changed files with 7 additions and 6 deletions

Binary file not shown.

View File

View File

@ -221,7 +221,7 @@ public class TYPE implements StatementVisitor{
protected Constraint<Pair> generateConstraint(MethodCall forMethod, MethodAssumption assumption, TypeInferenceBlockInformation info){
Constraint methodConstraint = new Constraint();
methodConstraint.add(ConstraintsFactory.createPair(forMethod.receiver.getType(), assumption.getReceiverType(), PairOperator.SMALLERDOT, info));
methodConstraint.add(ConstraintsFactory.createPair(assumption.getReturnType(), forMethod.getType(), PairOperator.SMALLERDOT, info));
methodConstraint.add(ConstraintsFactory.createPair(assumption.getReturnType(), forMethod.getType(), PairOperator.EQUALSDOT, info));
methodConstraint.addAll(generateParameterConstraints(forMethod, assumption, info));
return methodConstraint;
}
@ -229,8 +229,8 @@ public class TYPE implements StatementVisitor{
protected Set<Pair> generateParameterConstraints(MethodCall foMethod, MethodAssumption assumption, TypeInferenceBlockInformation info) {
Set<Pair> ret = new HashSet<>();
for(int i = 0;i<foMethod.arglist.getArguments().size();i++){
ret.add(ConstraintsFactory.createPair(assumption.getArgTypes().get(i),
foMethod.arglist.getArguments().get(i).getType(), PairOperator.SMALLERDOT, info));
ret.add(ConstraintsFactory.createPair(foMethod.arglist.getArguments().get(i).getType(),
assumption.getArgTypes().get(i), PairOperator.SMALLERDOT, info));
}
return ret;
}

View File

@ -1,6 +1,6 @@
class mathStruc<A> {
mathStruc(A a) { ;}
mathStruc(A a) { }
A model(){ A a; return a; }

View File

@ -30,8 +30,9 @@ public class JavaTXCompilerTest extends JavaTXCompiler {
@Test
public void test() throws IOException, ClassNotFoundException {
filesToTest.add(new File(rootDirectory+"Faculty.jav"));
//filesToTest.add(new File(rootDirectory+"mathStruc.jav"));
//filesToTest.add(new File(rootDirectory+"Faculty.jav"));
filesToTest.add(new File(rootDirectory+"mathStruc.jav"));
//filesToTest.add(new File(rootDirectory+"Faculty.jav"));
//filesToTest.add(new File(rootDirectory+"Lambda.jav"));
//filesToTest.add(new File(rootDirectory+"Lambda2.jav"));
//filesToTest.add(new File(rootDirectory+"Lambda3.jav"));