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
@@ -32,7 +32,7 @@ FILE: bangbang.kt
}
}
R|<local>/a|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()
R|<local>/a|.<Inapplicable(UNSAFE_CALL): /A.foo>#()
}
public final fun test_4(a: R|A?|, b: R|kotlin/Boolean|): R|kotlin/Unit| {
when () {
@@ -46,11 +46,11 @@ FILE: bangbang.kt
public final fun test_5(a: R|A?|, b: R|kotlin/Boolean|): R|kotlin/Unit| {
when () {
R|<local>/b| || R|<local>/a|!!.R|/A.foo|() -> {
R|<local>/a|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()
R|<local>/a|.<Inapplicable(UNSAFE_CALL): /A.foo>#()
}
}
R|<local>/a|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): /A.foo>#()
R|<local>/a|.<Inapplicable(UNSAFE_CALL): /A.foo>#()
}
public final fun <X : R|A?|> test_6(x: R|X|): R|kotlin/Unit| {
R|<local>/x|!!.R|/A.foo|()