forked from JavaTX/JavaCompilerCore
modified: src/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java
Unary-Expression SMALLERNEQDOT eingefuegt modified: test/bytecode/javFiles/Fac.jav
This commit is contained in:
parent
bb26112a9b
commit
5a0e53485c
@ -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{
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user