Bug 23 gefixt.

This commit is contained in:
JanUlrich 2015-09-24 15:26:34 +02:00
parent f2c7d3b6fa
commit 46291a6056
4 changed files with 23 additions and 4 deletions

View File

@ -410,9 +410,10 @@ public class TypeAssumptions {
public ClassAssumption getClassAssumptionFor(RefType t){
for(ClassAssumption cA : this.getClassAssumptions()){
if(cA.getAssumedClass().getType().equals(t))return cA;
RefType classType = cA.getAssumedClass().getType();
if(classType.get_Name().equals(t.get_Name()))return cA;
}
throw new TypeinferenceException("Der Typ "+t+" ist nicht in den Assumptions vorhanden", t);
throw new TypeinferenceException("Die Klasser den Typ "+t+" ist nicht in den Assumptions vorhanden", t);
}
public Type checkType(RefType type, SyntaxTreeNode parent) {

View File

@ -1,5 +1,5 @@
import de.dhbwstuttgart.typeinference.Menge;
import java.util.Vector;
class Matrix extends Menge<Menge<Integer>> {
class Matrix extends Vector<Vector<Integer>> {
op = (Matrix m) -> (f) -> f.apply(this, m);
}

View File

@ -0,0 +1,4 @@
class Matrix {
op = (f) -> f.apply(2);
}

View File

@ -0,0 +1,14 @@
package bytecode;
import org.junit.Test;
public class Matrix_lambdaTest2 {
public final static String rootDirectory = System.getProperty("user.dir")+"/test/bytecode/";
public final static String testFile = "Matrix_lambda2.jav";
public final static String outputFile = "Matrix_lambda2.class";
@Test
public void test() {
SingleClassTester.compileToBytecode(rootDirectory+testFile, rootDirectory+outputFile);
}
}