Don't report the same diagnsotics several times

This commit is contained in:
Victor Petukhov
2021-05-26 12:58:48 +03:00
parent e942052eb6
commit 4a767c597e
62 changed files with 202 additions and 166 deletions
@@ -1,3 +1,5 @@
// !WITH_NEW_INFERENCE
// FILE: P.java
import java.util.ArrayList;
@@ -13,5 +15,5 @@ public class P {
fun foo(c: P): MutableList<Int> {
// Error should be here: see KT-8168 Typechecker fails for platform collection type
return <!TYPE_MISMATCH, TYPE_MISMATCH!>c.getList() ?: listOf()<!>
return <!TYPE_MISMATCH{NI}!>c.getList() ?: <!TYPE_INFERENCE_EXPECTED_TYPE_MISMATCH{OI}, TYPE_MISMATCH{OI}!>listOf()<!><!>
}