Have a look to the following java expression: When it is executed, if leftRealValue and rightRealValue are Integer, the result is Double. For instance: rightRealValue = 1 type Integer leftRealValue = 0 type Integer Result: srcVariableValue = 1.0 type Double Is this the expected behaviour? Of course, switching to if statement, it works well, the result is of type Integer.