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
@@ -20,7 +20,7 @@ inline fun <reified T, reified K> case_1(x: T) {
inline fun <reified T, reified K> case_2(x: T) {
x as K
<!DEBUG_INFO_EXPRESSION_TYPE("T & K & T")!>x<!>
<!DEBUG_INFO_EXPRESSION_TYPE("T & K & T")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(x)
<!DEBUG_INFO_EXPRESSION_TYPE("T & K & T")!>x<!><!UNSAFE_CALL!>.<!>equals(x)
}
/*
@@ -49,7 +49,7 @@ inline fun <reified T, reified K> case_4(x: T?) {
inline fun <reified T, reified K> case_5(x: T) {
if (x is K?) {
<!DEBUG_INFO_EXPRESSION_TYPE("T & K? & T")!>x<!>
<!DEBUG_INFO_EXPRESSION_TYPE("T & K? & T")!>x<!>.<!INAPPLICABLE_CANDIDATE!>equals<!>(x)
<!DEBUG_INFO_EXPRESSION_TYPE("T & K? & T")!>x<!><!UNSAFE_CALL!>.<!>equals(x)
}
}