Files
kotlin/compiler/testData/codegen/bytecodeText/notNullAssertions/arrayListGet.kt
Alexander Udalov 2baddb029c Use Intrinsics.checkNotNullParameter to throw NPE in parameter null checks
Similarly to previous commits, this method was unused, so we're changing
its semantics in API version >= 1.4.

 #KT-22275 In Progress
2019-08-12 16:09:23 +02:00

17 lines
319 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
// Missing IMPLICIT_NOTNULL casts
import java.util.ArrayList
fun foo(): Any {
val a = ArrayList<String>()
return a.get(0)
}
fun bar(a: ArrayList<String>) {
}
// 1 checkExpressionValueIsNotNull
// 0 checkNotNullExpressionValue
// 1 checkParameterIsNotNull
// 0 checkNotNullParameter