Files
kotlin-fork/compiler/testData/codegen/box/casts/javaInterop/noNullCheckOnMapGet.kt
T
Steven Schäfer 0328fcaf5d JVM IR: Avoid IMPLICIT_NOTNULL checks on special bridge methods
...with dynamic type checks, except for the `@PlatformDependent`
methods, for which the JVM backend adds null checks.
2020-08-14 21:59:33 +02:00

13 lines
218 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FILE: A.java
public class A {
public static A nil() { return null; }
}
// FILE: test.kt
fun box(): String {
val m = mapOf<A, String>()
return m[A.nil()] ?: "OK"
}