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

View File

@@ -0,0 +1,26 @@
//WITH_RUNTIME
// FILE: JavaClass.java
public class JavaClass {
public Double test() {
return null;
}
}
// FILE: b.kt
fun test(s: Double) {
}
fun box(): String {
try {
test(JavaClass().test())
}
catch (e: IllegalStateException) {
return "OK"
}
return "fail"
}