letzte tests

This commit is contained in:
Fayez Abu Alia 2017-12-20 13:35:55 +01:00
parent ab36050f9b
commit 5f731bb09c
4 changed files with 13 additions and 10 deletions

View File

@ -196,19 +196,12 @@ public class UnifyTypeFactory {
RefTypeOrTPHOrWildcardOrGeneric tr = UnifyTypeFactory.convert(mp.getRhsType(), tphs);
if(tl instanceof TypePlaceholder){
if(tr instanceof TypePlaceholder) {
<<<<<<< HEAD
if(mp.getPairOp().equals(PairOperator.EQUALSDOT))
//throw new DebugException("TPH =. TPH ist ein ungültiges Ergebnis");
//Einfach ignorieren TODO: Das hier muss ausgebessert werden:
return new PairTPHequalRefTypeOrWildcardType((TypePlaceholder)tl, ASTFactory.createObjectType());
else
=======
if(mp.getPairOp().equals(PairOperator.EQUALSDOT)) {
return new PairTPHEqualTPH((TypePlaceholder)tl, (TypePlaceholder)tr);
//Einfach ignorieren TODO: Das hier muss ausgebessert werden:
//return new PairTPHequalRefTypeOrWildcardType((TypePlaceholder)tl, ASTFactory.createObjectType());
}else{
>>>>>>> eb8db0e0eb901afd5f4502ee4f7769a394b23422
return new PairTPHsmallerTPH((TypePlaceholder)tl, (TypePlaceholder)tr);
}
}else if(tr instanceof RefType){

View File

@ -1,6 +1,6 @@
public class DuMethod{
method(a,b){
method(a){
return a;
}

10
test/bytecode/IfTest.jav Normal file
View File

@ -0,0 +1,10 @@
public class IfTest{
Integer m1(Boolean b) {
Integer i;
if(b) {
return i;
}
return i;
}
}

View File

@ -29,7 +29,7 @@ public class JavaTXCompilerTest {
@Test
public void test() throws IOException, java.lang.ClassNotFoundException {
System.out.println(rootDirectory);
String fileName = "IfTest";
String fileName = "LamAssign";
filesToTest.add(new File(rootDirectory+fileName+".jav"));
System.out.println(rootDirectory+fileName+".jav");
JavaTXCompiler compiler = new JavaTXCompiler(filesToTest);