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
@@ -675,7 +675,7 @@ digraph boundSmartcastsInBranches_kt {
|
||||
275 [label="Access variable R|<local>/x|"];
|
||||
276 [label="Access variable R|kotlin/String.length|"];
|
||||
277 [label="Access variable R|<local>/y|"];
|
||||
278 [label="Access variable <Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/String.length>#"];
|
||||
278 [label="Access variable <Inapplicable(UNSAFE_CALL): kotlin/String.length>#"];
|
||||
279 [label="Access variable R|<local>/z|"];
|
||||
280 [label="Access variable R|kotlin/String.length|"];
|
||||
281 [label="Exit block"];
|
||||
@@ -700,11 +700,11 @@ digraph boundSmartcastsInBranches_kt {
|
||||
color=blue
|
||||
292 [label="Enter block"];
|
||||
293 [label="Access variable R|<local>/x|"];
|
||||
294 [label="Access variable <Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/String.length>#"];
|
||||
294 [label="Access variable <Inapplicable(UNSAFE_CALL): kotlin/String.length>#"];
|
||||
295 [label="Access variable R|<local>/y|"];
|
||||
296 [label="Access variable R|kotlin/String.length|"];
|
||||
297 [label="Access variable R|<local>/z|"];
|
||||
298 [label="Access variable <Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/String.length>#"];
|
||||
298 [label="Access variable <Inapplicable(UNSAFE_CALL): kotlin/String.length>#"];
|
||||
299 [label="Exit block"];
|
||||
}
|
||||
300 [label="Exit when branch result"];
|
||||
@@ -729,7 +729,7 @@ digraph boundSmartcastsInBranches_kt {
|
||||
311 [label="Access variable R|<local>/x|"];
|
||||
312 [label="Access variable R|kotlin/String.length|"];
|
||||
313 [label="Access variable R|<local>/y|"];
|
||||
314 [label="Access variable <Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/String.length>#"];
|
||||
314 [label="Access variable <Inapplicable(UNSAFE_CALL): kotlin/String.length>#"];
|
||||
315 [label="Access variable R|<local>/z|"];
|
||||
316 [label="Access variable R|kotlin/String.length|"];
|
||||
317 [label="Exit block"];
|
||||
|
||||
+4
-4
@@ -135,23 +135,23 @@ FILE: boundSmartcastsInBranches.kt
|
||||
when () {
|
||||
!=(R|<local>/x|, Null(null)) -> {
|
||||
R|<local>/x|.R|kotlin/String.length|
|
||||
R|<local>/y|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/String.length>#
|
||||
R|<local>/y|.<Inapplicable(UNSAFE_CALL): kotlin/String.length>#
|
||||
R|<local>/z|.R|kotlin/String.length|
|
||||
}
|
||||
}
|
||||
|
||||
when () {
|
||||
!=(R|<local>/y|, Null(null)) -> {
|
||||
R|<local>/x|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/String.length>#
|
||||
R|<local>/x|.<Inapplicable(UNSAFE_CALL): kotlin/String.length>#
|
||||
R|<local>/y|.R|kotlin/String.length|
|
||||
R|<local>/z|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/String.length>#
|
||||
R|<local>/z|.<Inapplicable(UNSAFE_CALL): kotlin/String.length>#
|
||||
}
|
||||
}
|
||||
|
||||
when () {
|
||||
!=(R|<local>/z|, Null(null)) -> {
|
||||
R|<local>/x|.R|kotlin/String.length|
|
||||
R|<local>/y|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/String.length>#
|
||||
R|<local>/y|.<Inapplicable(UNSAFE_CALL): kotlin/String.length>#
|
||||
R|<local>/z|.R|kotlin/String.length|
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user