Throw NPE instead of TypeCastException since 1.4

#KT-22275 In Progress
This commit is contained in:
Alexander Udalov
2019-08-06 11:21:48 +02:00
parent 2baddb029c
commit e207c96336
9 changed files with 48 additions and 13 deletions
@@ -782,8 +782,7 @@ class ExpressionCodegen(
v.checkcast(boxedRightType)
} else {
generateAsCast(
mv, kotlinType, boxedRightType, expression.operator == IrTypeOperator.SAFE_CAST,
state.languageVersionSettings.isReleaseCoroutines()
mv, kotlinType, boxedRightType, expression.operator == IrTypeOperator.SAFE_CAST, state.languageVersionSettings
)
}
MaterialValue(this, boxedRightType, expression.type).coerce(expression.type)