Cast unary intrinsics to expected type

This commit is contained in:
Natalia Ukhorskaya
2013-12-16 14:04:18 +04:00
parent 20aa3409c7
commit 4ef1af7d12
3 changed files with 16 additions and 1 deletions
@@ -53,6 +53,8 @@ public class UnaryMinus implements IntrinsicMethod {
else {
receiver.put(operandType, v);
}
return StackValue.onStack(genNegate(returnType, v));
Type negatedValue = genNegate(returnType, v);
StackValue.coerce(negatedValue, returnType, v);
return StackValue.onStack(returnType);
}
}