diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala index 075b4c29e5..a11024fbc6 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala +++ b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala @@ -1654,7 +1654,15 @@ abstract class GenJVM extends SubComponent with GenJVMUtil with GenAndroid with case Arithmetic(op, kind) => op match { - case ADD => jcode.emitADD(javaType(kind)) + case ADD => + (kind: @unchecked) match { + case BOOL | BYTE | CHAR | SHORT | INT => + jcode.emitIADD() + case LONG => jcode.emitLADD() + case FLOAT => jcode.emitFADD() + case DOUBLE => jcode.emitDADD() + } + case SUB => (kind: @unchecked) match { case BOOL | BYTE | CHAR | SHORT | INT => |