Files
kotlin-fork/compiler/testData/diagnostics/tests/smartCasts/smartCastOnLastExpressionOfLambdaAfterNothing.kt
T
Mikhail Zarechenskiy 2e131b870a Add tests for obsolete issues
#KT-38804 Obsolete
 #KT-38801 Obsolete
 #KT-38835 Obsolete
 #KT-38737 Obsolete
 #KT-38664 Obsolete
 #KT-38549 Obsolete
 #KT-38766 Obsolete
 #KT-38714 Obsolete
2020-08-11 12:34:02 +03:00

15 lines
254 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_PARAMETER
class Inv<T>
fun <T> foo(f: () -> T): Inv<T> = TODO()
fun myExit(): Nothing = TODO()
fun test(x: String?): Inv<String> {
return foo {
if (x == null) myExit()
<!DEBUG_INFO_SMARTCAST!>x<!>
}
}