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)
14 lines
335 B
Kotlin
Vendored
14 lines
335 B
Kotlin
Vendored
// !CHECK_TYPE
|
|
// !DIAGNOSTICS: -UNUSED_PARAMETER, -UNUSED_VARIABLE
|
|
|
|
object TestClass {
|
|
inline operator fun <T> invoke(task: () -> T) = task()
|
|
}
|
|
|
|
fun test(s: String): String {
|
|
val a = TestClass { TestClass { TestClass } }
|
|
a checkType { _<TestClass>() }
|
|
|
|
val b = TestClass { return s }
|
|
b checkType { _<Nothing>() }
|
|
} |