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:
Tianyu Geng
2021-04-08 21:17:01 +03:00
committed by Mikhail Glukhikh
parent 43a2ad0467
commit 6a03f31e50
62 changed files with 283 additions and 283 deletions
@@ -53,7 +53,7 @@ digraph safeCalls_kt {
19 [label="Function call: $subj$.R|/foo|(...)"];
20 [label="Exit safe call"];
21 [label="Access variable R|<local>/x|"];
22 [label="Access variable <Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/String.length>#"];
22 [label="Access variable <Inapplicable(UNSAFE_CALL): kotlin/String.length>#"];
23 [label="Exit block"];
}
24 [label="Exit function test" style="filled" fillcolor=red];
@@ -208,7 +208,7 @@ digraph safeCalls_kt {
78 [label="Function call: $subj$.R|/A.bool|()"];
79 [label="Exit safe call"];
80 [label="Access variable R|<local>/x|"];
81 [label="Function call: R|<local>/x|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.id>#()"];
81 [label="Function call: R|<local>/x|.<Inapplicable(UNSAFE_CALL): /A.id>#()"];
82 [label="Exit block"];
}
83 [label="Exit function test_4" style="filled" fillcolor=red];
@@ -272,7 +272,7 @@ digraph safeCalls_kt {
101 [label="Function call: $subj$.R|/boo|(...)"];
102 [label="Exit safe call"];
103 [label="Access variable R|<local>/x|"];
104 [label="Function call: R|<local>/x|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.id>#()"];
104 [label="Function call: R|<local>/x|.<Inapplicable(UNSAFE_CALL): /A.id>#()"];
105 [label="Exit block"];
}
106 [label="Exit function test_5" style="filled" fillcolor=red];