2ecba6ac39
This directive anyway does not make test run twice with OI, and with NI It only once run the test with specific settings (// LANGUAGE) and ignores irrelevant (OI or NI tags)
17 lines
474 B
Kotlin
Vendored
17 lines
474 B
Kotlin
Vendored
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNREACHABLE_CODE -UNUSED_VARIABLE -DEPRECATION
|
|
|
|
inline fun<reified T> foo(block: () -> T): String = block().toString()
|
|
|
|
inline fun <reified T: Any> javaClass(): Class<T> = T::class.java
|
|
|
|
fun box() {
|
|
val a = arrayOf(null!!)
|
|
val b = Array<Nothing?>(5) { null!! }
|
|
val c = foo() { null!! }
|
|
val d = foo<Any> { null!! }
|
|
val e = foo { "1" as Nothing }
|
|
val e1 = foo { "1" as Nothing? }
|
|
|
|
val f = javaClass<Nothing>()
|
|
}
|