Don't stop constraints processing if all type variables have proper equality constraints

Those type variable may have other constraints after incorporation into which, the constraint error may appear

^KT-42042 Fixed
This commit is contained in:
Victor Petukhov
2021-03-03 16:34:00 +03:00
parent 7f7bb70596
commit b87c2a15b5
13 changed files with 61 additions and 19 deletions
@@ -12,6 +12,6 @@ fun test(x: List<Int>, y: List<String>) {
A("", x) checkType { <!UNRESOLVED_REFERENCE_WRONG_RECEIVER{NI}!>_<!><A<Any?>>() }
A("", y) checkType { _<A<String?>>() }
A<CharSequence, String>("", <!TYPE_MISMATCH{NI}, TYPE_MISMATCH!>x<!>)
A<CharSequence, String>("", <!TYPE_MISMATCH{NI}, TYPE_MISMATCH, TYPE_MISMATCH!>x<!>)
A<CharSequence, String>("", y)
}
@@ -14,5 +14,5 @@ fun test(x: List<Int>, y: List<String>) {
Outer<Int>().Inner<CharSequence, String, Int>("", y, 1) checkType { _<Outer<Int>.Inner<CharSequence>>() }
Outer<Int>().Inner("", x, 1) checkType { <!UNRESOLVED_REFERENCE_WRONG_RECEIVER{NI}!>_<!><Outer<Int>.Inner<Any>>() }
Outer<Int>().Inner<CharSequence, String, Int>("", <!TYPE_MISMATCH{NI}, TYPE_MISMATCH!>x<!>, 1)
Outer<Int>().Inner<CharSequence, String, Int>("", <!TYPE_MISMATCH{NI}, TYPE_MISMATCH, TYPE_MISMATCH!>x<!>, 1)
}