FIR checker: report UNSAFE_CALL for overloaded function calls

Previously if an unsafe call is to an overloaded function, FIR checkers
report NONE_APPLICABLE. This change instead report them as UNSAFE_CALL
or its variants.
This commit is contained in:
Tianyu Geng
2021-04-09 21:26:07 +03:00
committed by Mikhail Glukhikh
parent 92df1f575a
commit 454ae3b17a
30 changed files with 83 additions and 142 deletions
@@ -6,11 +6,11 @@ package example
fun test() {
val p = test.Public()
if (p.public is Int) p.public + 1
if (p.<!HIDDEN!>protected<!> is Int) p.<!HIDDEN!>protected<!> <!NONE_APPLICABLE!>+<!> 1
if (p.<!HIDDEN!>protected<!> is Int) p.<!HIDDEN!>protected<!> <!UNSAFE_OPERATOR_CALL!>+<!> 1
if (p.internal is Int) p.internal + 1
val i = test.Internal()
if (i.public is Int) i.public + 1
if (i.<!HIDDEN!>protected<!> is Int) i.<!HIDDEN!>protected<!> <!NONE_APPLICABLE!>+<!> 1
if (i.<!HIDDEN!>protected<!> is Int) i.<!HIDDEN!>protected<!> <!UNSAFE_OPERATOR_CALL!>+<!> 1
if (i.internal is Int) i.internal + 1
}