Partial fix for KT-14989: Missed null check for platform type

This commit is contained in:
Mikhael Bogdanov
2016-11-25 14:33:42 +01:00
parent 88f0c32b2c
commit f9b40585cd
3 changed files with 36 additions and 2 deletions
@@ -660,13 +660,15 @@ public class AsmUtil {
@Override
public void putSelector(@NotNull Type type, @NotNull InstructionAdapter v) {
stackValue.put(type, v);
if (type.getSort() == Type.OBJECT || type.getSort() == Type.ARRAY) {
Type innerType = stackValue.type;
stackValue.put(innerType, v);
if (innerType.getSort() == Type.OBJECT || innerType.getSort() == Type.ARRAY) {
v.dup();
v.visitLdcInsn(runtimeAssertionInfo.getMessage());
v.invokestatic("kotlin/jvm/internal/Intrinsics", "checkExpressionValueIsNotNull",
"(Ljava/lang/Object;Ljava/lang/String;)V", false);
}
StackValue.coerce(innerType, type, v);
}
};
}