diff --git a/src/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java b/src/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java index fcd8ecfa..6b9f4919 100644 --- a/src/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java +++ b/src/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java @@ -201,7 +201,7 @@ public class TYPEStmt implements StatementVisitor{ unaryExpr.operation == UnaryExpr.Operation.PREINCREMENT){ //@see: https://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.14.2 //Expression muss zu Numeric Convertierbar sein. also von Numeric erben - constraintsSet.addUndConstraint(new Pair(unaryExpr.expr.getType(), number, PairOperator.SMALLERDOT)); + constraintsSet.addUndConstraint(new Pair(unaryExpr.expr.getType(), number, PairOperator.SMALLERNEQDOT)); //The type of the postfix increment expression is the type of the variable constraintsSet.addUndConstraint(new Pair(unaryExpr.expr.getType(), unaryExpr.getType(), PairOperator.EQUALSDOT)); }else{ diff --git a/test/bytecode/javFiles/Fac.jav b/test/bytecode/javFiles/Fac.jav index baee231b..eb2e6d61 100644 --- a/test/bytecode/javFiles/Fac.jav +++ b/test/bytecode/javFiles/Fac.jav @@ -4,7 +4,7 @@ import java.lang.Double; public class Fac { - java.lang.Long getFac(n){ + getFac(n){ var res = 1; var i = 1; while(i<=n) {