From 5a0e53485cff364cd5006859bab9ca11f97028bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Pl=C3=BCmicke?= Date: Wed, 30 May 2018 17:23:55 +0200 Subject: [PATCH] modified: src/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java Unary-Expression SMALLERNEQDOT eingefuegt modified: test/bytecode/javFiles/Fac.jav --- src/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java | 2 +- test/bytecode/javFiles/Fac.jav | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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) {