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:
committed by
Mikhail Glukhikh
parent
92df1f575a
commit
454ae3b17a
+2
-2
@@ -23,13 +23,13 @@ fun testDataFlowInfo1(a: Int?, b: Int?) {
|
||||
val c: Int = a ?: b!!
|
||||
doInt(c)
|
||||
// b is nullable if a != null
|
||||
b <!NONE_APPLICABLE!>+<!> 1
|
||||
b <!UNSAFE_OPERATOR_CALL!>+<!> 1
|
||||
}
|
||||
|
||||
fun testDataFlowInfo2(a: Int?, b: Int?) {
|
||||
doInt(a ?: b!!)
|
||||
// b is nullable if a != null
|
||||
b <!NONE_APPLICABLE!>+<!> 1
|
||||
b <!UNSAFE_OPERATOR_CALL!>+<!> 1
|
||||
}
|
||||
|
||||
fun testTypeMismatch(a: String?, b: Any) {
|
||||
|
||||
Reference in New Issue
Block a user