Generate widening cast for Byte and Short to Int

This commit is contained in:
Dmitry Petrov
2020-05-06 11:40:51 +03:00
parent 427973fe48
commit 3143b15a17
7 changed files with 12 additions and 3 deletions
@@ -388,9 +388,6 @@ class OperatorExpressionGenerator(statementGenerator: StatementGenerator) : Stat
operandType == targetType || operandNNType == targetType ->
this
targetType.isInt() && (operandNNType.isShort() || operandNNType.isByte()) ->
this
// TODO: don't rely on originalKotlinType.
type.originalKotlinType!!.containsNull() ->
safeCallOnDispatchReceiver(this@OperatorExpressionGenerator, startOffset, endOffset) { dispatchReceiver ->