Files
kotlin-fork/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/nullAsNothing.kt
T
2019-05-22 15:45:59 +03:00

10 lines
246 B
Kotlin
Vendored

// !WITH_NEW_INFERENCE
// !CHECK_TYPE
val x get() = null
val <!IMPLICIT_NOTHING_PROPERTY_TYPE!>y<!> get() = null!!
fun foo() {
<!DEBUG_INFO_CONSTANT!>x<!> checkType { _<Nothing?>() }
y <!UNREACHABLE_CODE!>checkType { _<Nothing>() }<!>
}