Files
kotlin-fork/compiler/testData/diagnostics/tests/smartCasts/explicitDefaultGetter.kt
T
2017-11-29 02:54:26 +03:00

12 lines
257 B
Kotlin
Vendored

// !WITH_NEW_INFERENCE
class ExplicitAccessorForAnnotation {
val tt: String? = "good"
get
fun foo(): String {
if (tt is String) {
return <!NI;TYPE_MISMATCH, SMARTCAST_IMPOSSIBLE!>tt<!>
}
return ""
}
}