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
@@ -14,7 +14,7 @@ fun case_1(x: Class?) {
fun case_2() {
var x: Class? = <!INITIALIZER_TYPE_MISMATCH!>10<!>
x!!
<!NONE_APPLICABLE!>x<!>(if (true) {x=null;0} else 0, <!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>)
<!UNSAFE_IMPLICIT_INVOKE_CALL!>x<!>(if (true) {x=null;0} else 0, <!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>)
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!><!UNSAFE_CALL!>.<!>fun_1()
}
@@ -23,7 +23,7 @@ fun case_2() {
fun case_3() {
var x: Class? = Class()
x!!
val y = <!DEBUG_INFO_EXPRESSION_TYPE("Class? & Class")!>x<!>[if (true) {x=null;0} else 0, <!NO_VALUE_FOR_PARAMETER!><!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>[0]<!>]
val y = <!DEBUG_INFO_EXPRESSION_TYPE("Class? & Class")!>x<!>[if (true) {x=null;0} else 0, <!UNSAFE_CALL!><!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>[0]<!>]
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!>
<!DEBUG_INFO_EXPRESSION_TYPE("Class?")!>x<!><!UNSAFE_CALL!>.<!>fun_1()
}