FIR: Report UNSAFE_CALL instead of SMARTCAST_IMPOSSIBLE when smartcast
to null. Currently the error message shows the expression is impossible to smartcast to the nullable type, which is nonsensical since it's already that type.
This commit is contained in:
committed by
teamcityserver
parent
0627dbcb78
commit
504449f03e
@@ -175,3 +175,10 @@ fun test_13(q: QImplMutable?) {
|
||||
<!SMARTCAST_IMPOSSIBLE!>q.data<!>.s.inc() // should be bad
|
||||
}
|
||||
}
|
||||
|
||||
fun test_14(q: Q) {
|
||||
// `q.data` is a property that has an open getter
|
||||
if (q.data == null) {
|
||||
q.data<!UNSAFE_CALL!>.<!>s // should be UNSAFE_CALL and NOT SMARTCAST_IMPOSSIBLE
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user