blob: 8ba7f4de93d802a42631392f6a8bea9edc44ceb5 [file]
// 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>() }
<!UNREACHABLE_CODE!>val b =<!> TestClass { return s }
<!UNREACHABLE_CODE!>b checkType { _<Nothing>() }<!>
}