[NI] Fix smartcasts computation for dot-qualifier expressions

This commit is contained in:
Mikhail Zarechenskiy
2018-04-16 17:43:07 +03:00
parent 55da251ffc
commit 3318549622
6 changed files with 35 additions and 3 deletions
@@ -0,0 +1,9 @@
// !DIAGNOSTICS: -UNUSED_VARIABLE
class Item(val link: String?)
fun test(item: Item) {
if (item.link != null) {
val href: String = <!DEBUG_INFO_SMARTCAST!>item.link<!>
}
}
@@ -0,0 +1,11 @@
package
public fun test(/*0*/ item: Item): kotlin.Unit
public final class Item {
public constructor Item(/*0*/ link: kotlin.String?)
public final val link: kotlin.String?
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}