9a4a3d1f49
^KT-56543 Merge-request: KT-MR-9299 Merged-by: Dmitrii Gridin <dmitry.gridin@jetbrains.com>
20 lines
542 B
Kotlin
Vendored
20 lines
542 B
Kotlin
Vendored
// IGNORE_REVERSED_RESOLVE
|
|
// FIR_IDENTICAL
|
|
class Foo(var x: Int?) {
|
|
init {
|
|
if (x != null) {
|
|
val y = x
|
|
// Error: x is not stable, Type(y) = Int?
|
|
<!SMARTCAST_IMPOSSIBLE!>x<!>.hashCode()
|
|
y<!UNSAFE_CALL!>.<!>hashCode()
|
|
if (y == x) {
|
|
// Still error
|
|
y<!UNSAFE_CALL!>.<!>hashCode()
|
|
}
|
|
if (x == null && y != x) {
|
|
// Still error
|
|
y<!UNSAFE_CALL!>.<!>hashCode()
|
|
}
|
|
}
|
|
}
|
|
} |