[FIR] Add smartcasts from == if equals is from Any
^KT-49127 Fixed
This commit is contained in:
committed by
teamcityserver
parent
ac718cd1c4
commit
1f0b62b25f
+3
-3
@@ -34,11 +34,11 @@ fun foo(x: FinalClass?, y: Any) {
|
||||
// OK
|
||||
x.hashCode()
|
||||
// OK
|
||||
y.<!UNRESOLVED_REFERENCE!>use<!>()
|
||||
y.use()
|
||||
}
|
||||
when (x) {
|
||||
// OK (equals from FinalClass)
|
||||
y -> y.<!UNRESOLVED_REFERENCE!>use<!>()
|
||||
y -> y.use()
|
||||
}
|
||||
when (y) {
|
||||
// ERROR (equals from Any)
|
||||
@@ -92,4 +92,4 @@ sealed class Sealed {
|
||||
<!UNRESOLVED_REFERENCE!>gav<!>()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user