[NI] Fix smartcasts computation for dot-qualifier expressions
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
// !WITH_NEW_INFERENCE
|
||||
// See also: KT-11998
|
||||
data class My(val x: Boolean?)
|
||||
|
||||
@@ -7,7 +6,7 @@ fun doIt() {}
|
||||
fun foo(my: My) {
|
||||
if (my.x != null) {
|
||||
// my.x should be smart-cast
|
||||
if (<!DEBUG_INFO_SMARTCAST!>my.<!NI;TYPE_MISMATCH!>x<!><!>) doIt()
|
||||
if (<!DEBUG_INFO_SMARTCAST!>my.x<!>) doIt()
|
||||
when (<!DEBUG_INFO_SMARTCAST!>my.x<!>) {
|
||||
true -> doIt()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user