FIR: add UnsafeCall resolution diagnostics
Previously unsafe call is reported as part of InapplicableWrongReceiver. This makes it difficult for the downstream checkers to report different diagnostics.
This commit is contained in:
committed by
Mikhail Glukhikh
parent
43a2ad0467
commit
6a03f31e50
+4
-4
@@ -22,15 +22,15 @@ FILE: equalsAndIdentity.kt
|
||||
public final fun test_2(x: R|A?|, y: R|A?|): R|kotlin/Unit| {
|
||||
when () {
|
||||
==(R|<local>/x|, R|<local>/y|) -> {
|
||||
R|<local>/x|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()
|
||||
R|<local>/y|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()
|
||||
R|<local>/x|.<Inapplicable(UNSAFE_CALL): /A.foo>#()
|
||||
R|<local>/y|.<Inapplicable(UNSAFE_CALL): /A.foo>#()
|
||||
}
|
||||
}
|
||||
|
||||
when () {
|
||||
===(R|<local>/x|, R|<local>/y|) -> {
|
||||
R|<local>/x|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()
|
||||
R|<local>/y|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()
|
||||
R|<local>/x|.<Inapplicable(UNSAFE_CALL): /A.foo>#()
|
||||
R|<local>/y|.<Inapplicable(UNSAFE_CALL): /A.foo>#()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user