FIR: implement LT positioning in diagnostic tests, fix LT strategies

This commit is contained in:
Mikhail Glukhikh
2021-01-21 13:47:07 +03:00
parent f1d8a6e5d1
commit 40bec30393
36 changed files with 275 additions and 210 deletions
@@ -1,4 +1,4 @@
<!CONFLICTING_OVERLOADS{LT}!><!CONFLICTING_OVERLOADS{PSI}!>fun takeString(s: String)<!> {}<!>
<!CONFLICTING_OVERLOADS!>fun takeString(s: String)<!> {}
class Wrapper(val s: String?) {
fun withThis() {
@@ -11,4 +11,4 @@ class Wrapper(val s: String?) {
}
}
<!CONFLICTING_OVERLOADS{LT}!><!CONFLICTING_OVERLOADS{PSI}!>fun takeString(s: String)<!> {}<!>
<!CONFLICTING_OVERLOADS!>fun takeString(s: String)<!> {}
@@ -23,11 +23,11 @@ fun test_2(a: A?) {
}
}
<!CONFLICTING_OVERLOADS{LT}!><!CONFLICTING_OVERLOADS{PSI}!>fun test_3(x: Any?)<!> {
<!CONFLICTING_OVERLOADS!>fun test_3(x: Any?)<!> {
val a = x as? A ?: return
a.foo() // Should be OK
x.foo() // Should be OK
}<!>
}
// ----------------- Unstable -----------------
@@ -53,8 +53,8 @@ fun test_2(a: B?) {
}
}
<!CONFLICTING_OVERLOADS{LT}!><!CONFLICTING_OVERLOADS{PSI}!>fun test_3(x: Any?)<!> {
<!CONFLICTING_OVERLOADS!>fun test_3(x: Any?)<!> {
val a = x as? B ?: return
a.foo() // Should be OK
x.foo() // Should be OK
}<!>
}