DFA bug fix: assignment of unstable to stable uses predictable nullability (see test)
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
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()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user