mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
Partial fix for KT-14989: Missed null check for platform type
This commit is contained in:
26
compiler/testData/codegen/boxAgainstJava/platformTypes/kt14989.kt
vendored
Normal file
26
compiler/testData/codegen/boxAgainstJava/platformTypes/kt14989.kt
vendored
Normal 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"
|
||||
}
|
||||
Reference in New Issue
Block a user