[FIR] Fix tests (ARGUMENT_TYPE_MISMATCH instead of INCOMPATIBLE_CANDIDATE)

This commit is contained in:
Ivan Kochurkin
2021-04-06 01:35:30 +03:00
committed by TeamCityServer
parent 4ffab5fe5a
commit ad9b962536
461 changed files with 1239 additions and 1246 deletions
@@ -2,13 +2,13 @@
// !DIAGNOSTICS: -USELESS_ELVIS
fun test() {
<!INAPPLICABLE_CANDIDATE!>bar<!>(if (true) {
bar(<!ARGUMENT_TYPE_MISMATCH!>if (true) {
1
} else {
2
})
}<!>)
<!INAPPLICABLE_CANDIDATE!>bar<!>(1 ?: 2)
bar(<!ARGUMENT_TYPE_MISMATCH!>1 ?: 2<!>)
}
fun bar(s: String) = s
@@ -33,5 +33,5 @@ fun testDataFlowInfo2(a: Int?, b: Int?) {
}
fun testTypeMismatch(a: String?, b: Any) {
<!INAPPLICABLE_CANDIDATE!>doInt<!>(a ?: b)
doInt(<!ARGUMENT_TYPE_MISMATCH!>a ?: b<!>)
}
@@ -4,19 +4,19 @@ package b
fun bar(i: Int) = i
fun test(a: Int?, b: Int?) {
<!INAPPLICABLE_CANDIDATE!>bar<!>(if (a == null) return else b)
bar(<!ARGUMENT_TYPE_MISMATCH!>if (a == null) return else b<!>)
}
fun test(a: Int?, b: Int?, c: Int?) {
<!INAPPLICABLE_CANDIDATE!>bar<!>(if (a == null) return else if (b == null) return else c)
bar(<!ARGUMENT_TYPE_MISMATCH!>if (a == null) return else if (b == null) return else c<!>)
}
fun test(a: Any?, b: Any?, c: Int?) {
<!INAPPLICABLE_CANDIDATE!>bar<!>(if (a == null) if (b == null) c else return else return)
bar(<!ARGUMENT_TYPE_MISMATCH!>if (a == null) if (b == null) c else return else return<!>)
}
fun test(a: Int?, b: Any?, c: Int?) {
<!INAPPLICABLE_CANDIDATE!>bar<!>(if (a == null) {
bar(<!ARGUMENT_TYPE_MISMATCH!>if (a == null) {
return
} else {
if (b == null) {
@@ -24,5 +24,5 @@ fun test(a: Int?, b: Any?, c: Int?) {
} else {
c
}
})
}<!>)
}