bcc8802014
Expression will be checked against expected type later. Theoretically, this is not very good, but it aligns with the old inference, plus it helps avoiding multiple type mismatch diagnostics.
12 lines
239 B
Kotlin
Vendored
12 lines
239 B
Kotlin
Vendored
// !WITH_NEW_INFERENCE
|
|
class ExplicitAccessorForAnnotation {
|
|
val tt: String? = "good"
|
|
get
|
|
|
|
fun foo(): String {
|
|
if (tt is String) {
|
|
return <!SMARTCAST_IMPOSSIBLE!>tt<!>
|
|
}
|
|
return ""
|
|
}
|
|
} |