modified: src/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java

Unary-Expression SMALLERNEQDOT eingefuegt
	modified:   test/bytecode/javFiles/Fac.jav
This commit is contained in:
Martin Plümicke 2018-05-30 17:23:55 +02:00
parent bb26112a9b
commit 5a0e53485c
2 changed files with 2 additions and 2 deletions

View File

@ -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{

View File

@ -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) {