K2: Deduplicate diagnostics for the consistency with K1

The FE1.0 PerFileAnalysisCache deduplicates diagnostics. To match the
behavior, this commit deduplicates K2 diagnostics. The initial
motivation of this commit is duplicated errors reported by Compose
compiler plugin (one of core Android Studio feature).

^KT-62498
diff --git a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostics/FileStructureElementDiagnosticList.kt b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostics/FileStructureElementDiagnosticList.kt
index ff8c32e..7b7a5f1 100644
--- a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostics/FileStructureElementDiagnosticList.kt
+++ b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostics/FileStructureElementDiagnosticList.kt
@@ -9,9 +9,9 @@
 import org.jetbrains.kotlin.diagnostics.KtPsiDiagnostic
 
 internal class FileStructureElementDiagnosticList(
-    private val map: Map<PsiElement, List<KtPsiDiagnostic>>
+    private val map: Map<PsiElement, Collection<KtPsiDiagnostic>>
 ) {
-    fun diagnosticsFor(element: PsiElement): List<KtPsiDiagnostic> = map[element] ?: emptyList()
+    fun diagnosticsFor(element: PsiElement): Collection<KtPsiDiagnostic> = map[element] ?: emptyList()
 
-    inline fun forEach(action: (List<KtPsiDiagnostic>) -> Unit) = map.values.forEach(action)
+    inline fun forEach(action: (Collection<KtPsiDiagnostic>) -> Unit) = map.values.forEach(action)
 }
diff --git a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostics/FileStructureElementDiagnostics.kt b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostics/FileStructureElementDiagnostics.kt
index 4902d79..65f4d94 100644
--- a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostics/FileStructureElementDiagnostics.kt
+++ b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostics/FileStructureElementDiagnostics.kt
@@ -36,7 +36,7 @@
         }
 
 
-    inline fun forEach(filter: DiagnosticCheckerFilter, action: (List<KtPsiDiagnostic>) -> Unit) {
+    inline fun forEach(filter: DiagnosticCheckerFilter, action: (Collection<KtPsiDiagnostic>) -> Unit) {
         if (filter.runCommonCheckers) {
             diagnosticByCommonCheckers.forEach(action)
         }
diff --git a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostics/LLFirDiagnosticReporter.kt b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostics/LLFirDiagnosticReporter.kt
index 6bae9cb..5102b00 100644
--- a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostics/LLFirDiagnosticReporter.kt
+++ b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostics/LLFirDiagnosticReporter.kt
@@ -14,7 +14,7 @@
 
 internal class LLFirDiagnosticReporter : DiagnosticReporter() {
     private val pendingDiagnostics = mutableMapOf<PsiElement, MutableList<KtPsiDiagnostic>>()
-    val committedDiagnostics = mutableMapOf<PsiElement, MutableList<KtPsiDiagnostic>>()
+    val committedDiagnostics = mutableMapOf<PsiElement, MutableSet<KtPsiDiagnostic>>()
 
     override fun report(diagnostic: KtDiagnostic?, context: DiagnosticContext) {
         if (diagnostic == null) return
@@ -35,7 +35,7 @@
     override fun checkAndCommitReportsOn(element: AbstractKtSourceElement, context: DiagnosticContext?) {
         val commitEverything = context == null
         for ((diagnosticElement, pendingList) in pendingDiagnostics) {
-            val committedList = committedDiagnostics.getOrPut(diagnosticElement) { mutableListOf() }
+            val committedSet = committedDiagnostics.getOrPut(diagnosticElement) { mutableSetOf() }
             val iterator = pendingList.iterator()
             while (iterator.hasNext()) {
                 val diagnostic = iterator.next()
@@ -49,7 +49,7 @@
                     }
                     diagnostic.element == element || commitEverything -> {
                         iterator.remove()
-                        committedList += diagnostic
+                        committedSet += diagnostic
                     }
                 }
             }
diff --git a/compiler/fir/analysis-tests/testData/resolve/checkers/notUselessCast_2.kt b/compiler/fir/analysis-tests/testData/resolve/checkers/notUselessCast_2.kt
index 1bf2462..4b3239f 100644
--- a/compiler/fir/analysis-tests/testData/resolve/checkers/notUselessCast_2.kt
+++ b/compiler/fir/analysis-tests/testData/resolve/checkers/notUselessCast_2.kt
@@ -19,5 +19,5 @@
 fun test_2(): Wrapper<Foo?> {
     return <!RETURN_TYPE_MISMATCH!>Wrapper(Bar("bar"))
         .map { it.toFoo() }
-        .swapWrappedValue { <!TYPE_MISMATCH, TYPE_MISMATCH!>Wrapper(null)<!> }<!>
+        .swapWrappedValue { <!TYPE_MISMATCH!>Wrapper(null)<!> }<!>
 }
diff --git a/compiler/fir/analysis-tests/testData/resolve/kt54775.kt b/compiler/fir/analysis-tests/testData/resolve/kt54775.kt
index 356c830..1603d2ee2 100644
--- a/compiler/fir/analysis-tests/testData/resolve/kt54775.kt
+++ b/compiler/fir/analysis-tests/testData/resolve/kt54775.kt
@@ -2,6 +2,6 @@
     return null <!UNCHECKED_CAST!>as T<!>
 }
 
-class X() : <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>B<!> by <!ASSIGNMENT_IN_EXPRESSION_CONTEXT!><!VARIABLE_EXPECTED!><!UNRESOLVED_REFERENCE!>get<!>()<!> = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>bar<!>()<!> {
+class X() : <!UNRESOLVED_REFERENCE!>B<!> by <!ASSIGNMENT_IN_EXPRESSION_CONTEXT!><!VARIABLE_EXPECTED!><!UNRESOLVED_REFERENCE!>get<!>()<!> = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>bar<!>()<!> {
     val prop = <!ASSIGNMENT_IN_EXPRESSION_CONTEXT!><!VARIABLE_EXPECTED!><!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>bar<!>()<!> = 2<!>
 }
diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/fromBasicDiagnosticTests/chooseCallableReferenceDependingOnInferredReceiver.kt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/fromBasicDiagnosticTests/chooseCallableReferenceDependingOnInferredReceiver.kt
index a3a42e6..0858b27 100644
--- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/fromBasicDiagnosticTests/chooseCallableReferenceDependingOnInferredReceiver.kt
+++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/fromBasicDiagnosticTests/chooseCallableReferenceDependingOnInferredReceiver.kt
@@ -14,7 +14,7 @@
 fun <T> bar(f: (T) -> Unit): T = TODO()
 
 fun test() {
-    <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>myWith<!>(A()) {
+    <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>myWith<!>(A()) {
         val t1 = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>bar<!>(::foo)
 
         val t2 = bar(::baz)
diff --git a/compiler/frontend.common/src/org/jetbrains/kotlin/diagnostics/impl/PendingDiagnosticsCollectorWithSuppress.kt b/compiler/frontend.common/src/org/jetbrains/kotlin/diagnostics/impl/PendingDiagnosticsCollectorWithSuppress.kt
index 480ba71..21caab2 100644
--- a/compiler/frontend.common/src/org/jetbrains/kotlin/diagnostics/impl/PendingDiagnosticsCollectorWithSuppress.kt
+++ b/compiler/frontend.common/src/org/jetbrains/kotlin/diagnostics/impl/PendingDiagnosticsCollectorWithSuppress.kt
@@ -12,11 +12,11 @@
 
 class PendingDiagnosticsCollectorWithSuppress(override val rawReport: (Boolean, String) -> Unit) : BaseDiagnosticsCollector() {
     private val pendingDiagnosticsByFilePath: MutableMap<String?, MutableList<KtDiagnostic>> = mutableMapOf()
-    private val _diagnosticsByFilePath: MutableMap<String?, MutableList<KtDiagnostic>> = mutableMapOf()
+    private val _diagnosticsByFilePath: MutableMap<String?, MutableSet<KtDiagnostic>> = mutableMapOf()
     override val diagnostics: List<KtDiagnostic>
         get() = _diagnosticsByFilePath.flatMap { it.value }
     override val diagnosticsByFilePath: Map<String?, List<KtDiagnostic>>
-        get() = _diagnosticsByFilePath
+        get() = _diagnosticsByFilePath.mapValues { it.value.toList() }
 
     override var hasErrors = false
         private set
@@ -35,7 +35,7 @@
     ) {
         val commitEverything = context == null
         for ((path, pendingList) in pendingDiagnosticsByFilePath) {
-            val committedList = _diagnosticsByFilePath.getOrPut(path) { mutableListOf() }
+            val committedSet = _diagnosticsByFilePath.getOrPut(path) { mutableSetOf() }
             val iterator = pendingList.iterator()
             while (iterator.hasNext()) {
                 val diagnostic = iterator.next()
@@ -49,7 +49,7 @@
                     }
                     diagnostic.element == element || commitEverything -> {
                         iterator.remove()
-                        committedList += diagnostic
+                        committedSet += diagnostic
                         if (!hasErrors && diagnostic.severity == Severity.ERROR) {
                             hasErrors = true
                         }
@@ -58,4 +58,4 @@
             }
         }
     }
-}
+}
\ No newline at end of file
diff --git a/compiler/testData/diagnostics/tests/PropertyInitializers.fir.kt b/compiler/testData/diagnostics/tests/PropertyInitializers.fir.kt
index fe2a3f9..124f61c 100644
--- a/compiler/testData/diagnostics/tests/PropertyInitializers.fir.kt
+++ b/compiler/testData/diagnostics/tests/PropertyInitializers.fir.kt
@@ -9,5 +9,5 @@
     val e: Int
         get() = <!UNRESOLVED_REFERENCE!>b<!>
 
-    val map: Map<String, Int> = <!INITIALIZER_TYPE_MISMATCH, TYPE_MISMATCH("kotlin.String; kotlin.Int"), TYPE_MISMATCH("kotlin.String; kotlin.Int"), TYPE_MISMATCH("kotlin.Int; kotlin.String"), TYPE_MISMATCH("kotlin.String; kotlin.Int"), TYPE_MISMATCH("kotlin.Int; kotlin.String")!>mapOf(1 to "hello")<!>
+    val map: Map<String, Int> = <!INITIALIZER_TYPE_MISMATCH, TYPE_MISMATCH("kotlin.String; kotlin.Int"), TYPE_MISMATCH("kotlin.Int; kotlin.String")!>mapOf(1 to "hello")<!>
 }
diff --git a/compiler/testData/diagnostics/tests/annotations/requireKotlin.fir.kt b/compiler/testData/diagnostics/tests/annotations/requireKotlin.fir.kt
index 47adeb3..140f120 100644
--- a/compiler/testData/diagnostics/tests/annotations/requireKotlin.fir.kt
+++ b/compiler/testData/diagnostics/tests/annotations/requireKotlin.fir.kt
@@ -2,11 +2,11 @@
 
 import kotlin.internal.*
 
-@<!INVISIBLE_REFERENCE, INVISIBLE_REFERENCE!>RequireKotlin<!>(<!ILLEGAL_KOTLIN_VERSION_STRING_VALUE!>"1.x"<!>)
+@<!INVISIBLE_REFERENCE!>RequireKotlin<!>(<!ILLEGAL_KOTLIN_VERSION_STRING_VALUE!>"1.x"<!>)
 class IllegalVersion()
 
-@<!INVISIBLE_REFERENCE, INVISIBLE_REFERENCE!>RequireKotlin<!>("1.2")
+@<!INVISIBLE_REFERENCE!>RequireKotlin<!>("1.2")
 class LegalMinimum()
 
-@<!INVISIBLE_REFERENCE, INVISIBLE_REFERENCE!>RequireKotlin<!>("1.2", versionKind = <!INVISIBLE_REFERENCE, NO_COMPANION_OBJECT!>RequireKotlinVersionKind<!>.<!INVISIBLE_REFERENCE!>COMPILER_VERSION<!>, message = "Requires newer compiler version to be inlined correctly.")
+@<!INVISIBLE_REFERENCE!>RequireKotlin<!>("1.2", versionKind = <!INVISIBLE_REFERENCE, NO_COMPANION_OBJECT!>RequireKotlinVersionKind<!>.<!INVISIBLE_REFERENCE!>COMPILER_VERSION<!>, message = "Requires newer compiler version to be inlined correctly.")
 class LegalStdLib()
diff --git a/compiler/testData/diagnostics/tests/callableReference/generic/genericFunctionsWithNullableTypes.fir.kt b/compiler/testData/diagnostics/tests/callableReference/generic/genericFunctionsWithNullableTypes.fir.kt
index 279caae..a634d55 100644
--- a/compiler/testData/diagnostics/tests/callableReference/generic/genericFunctionsWithNullableTypes.fir.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/generic/genericFunctionsWithNullableTypes.fir.kt
@@ -26,9 +26,9 @@
     baz<Int?, String>(null, <!NULL_FOR_NONNULL_TYPE!>null<!>, ::foo)
     <!REIFIED_TYPE_FORBIDDEN_SUBSTITUTION!>baz<!>(null, "", ::foo)
     <!REIFIED_TYPE_FORBIDDEN_SUBSTITUTION!>baz<!>(1, null, ::foo)
-    <!REIFIED_TYPE_FORBIDDEN_SUBSTITUTION, REIFIED_TYPE_FORBIDDEN_SUBSTITUTION!>baz<!>(null, null, ::foo)
+    <!REIFIED_TYPE_FORBIDDEN_SUBSTITUTION!>baz<!>(null, null, ::foo)
 
-    val s3: Pair<Int, String?> = <!TYPE_MISMATCH, TYPE_MISMATCH!>bar(null, null, ::foo)<!>
+    val s3: Pair<Int, String?> = <!TYPE_MISMATCH!>bar(null, null, ::foo)<!>
     val s4: Pair<Int?, String> = <!INITIALIZER_TYPE_MISMATCH, TYPE_MISMATCH, TYPE_MISMATCH!>bar(null, null, ::foo)<!>
 
     val s5: Pair<Int, String> = <!INITIALIZER_TYPE_MISMATCH, TYPE_MISMATCH!>bar(1, "", ::foo)<!>
diff --git a/compiler/testData/diagnostics/tests/callableReference/kt34314.fir.kt b/compiler/testData/diagnostics/tests/callableReference/kt34314.fir.kt
index 1832a82..7da5d54 100644
--- a/compiler/testData/diagnostics/tests/callableReference/kt34314.fir.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/kt34314.fir.kt
@@ -1,5 +1,5 @@
 // !DIAGNOSTICS: -UNUSED_VARIABLE
 
 fun main() {
-    val x = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>run<!> { ::run } // no error
+    val x = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>run<!> { ::run } // no error
 }
diff --git a/compiler/testData/diagnostics/tests/callableReference/resolve/chooseCallableReferenceDependingOnInferredReceiver.fir.kt b/compiler/testData/diagnostics/tests/callableReference/resolve/chooseCallableReferenceDependingOnInferredReceiver.fir.kt
index 7dc3892..b444b1d 100644
--- a/compiler/testData/diagnostics/tests/callableReference/resolve/chooseCallableReferenceDependingOnInferredReceiver.fir.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/resolve/chooseCallableReferenceDependingOnInferredReceiver.fir.kt
@@ -16,7 +16,7 @@
 fun <T> bar(f: (T) -> Unit): T = TODO()
 
 fun test() {
-    <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>myWith<!>(A()) {
+    <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>myWith<!>(A()) {
         val t1 = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>bar<!>(::foo)
         t1
 
diff --git a/compiler/testData/diagnostics/tests/collectionLiterals/basicCollectionLiterals.fir.kt b/compiler/testData/diagnostics/tests/collectionLiterals/basicCollectionLiterals.fir.kt
index b224547..cc8ac47 100644
--- a/compiler/testData/diagnostics/tests/collectionLiterals/basicCollectionLiterals.fir.kt
+++ b/compiler/testData/diagnostics/tests/collectionLiterals/basicCollectionLiterals.fir.kt
@@ -6,7 +6,7 @@
     val b: Array<Int> = []
     val c = [1, 2]
     val d: Array<Int> = [1, 2]
-    val e: Array<String> = <!TYPE_MISMATCH, TYPE_MISMATCH!>[1]<!>
+    val e: Array<String> = <!TYPE_MISMATCH!>[1]<!>
 
     val f: IntArray = [1, 2]
     val g = [f]
diff --git a/compiler/testData/diagnostics/tests/collectionLiterals/defaultValuesInAnnotation.fir.kt b/compiler/testData/diagnostics/tests/collectionLiterals/defaultValuesInAnnotation.fir.kt
index 4aab0cb..6da1dfa 100644
--- a/compiler/testData/diagnostics/tests/collectionLiterals/defaultValuesInAnnotation.fir.kt
+++ b/compiler/testData/diagnostics/tests/collectionLiterals/defaultValuesInAnnotation.fir.kt
@@ -8,9 +8,9 @@
 )
 
 annotation class Bar(
-        val a: Array<String> = <!TYPE_MISMATCH, TYPE_MISMATCH!>[' ']<!>,
+        val a: Array<String> = <!TYPE_MISMATCH!>[' ']<!>,
         val b: Array<String> = ["", <!EMPTY_CHARACTER_LITERAL!>''<!>],
-        val c: Array<String> = <!TYPE_MISMATCH, TYPE_MISMATCH!>[1]<!>
+        val c: Array<String> = <!TYPE_MISMATCH!>[1]<!>
 )
 
 annotation class Base(
@@ -22,5 +22,5 @@
 
 annotation class Err(
         val a: IntArray = [<!ARGUMENT_TYPE_MISMATCH!>1L<!>],
-        val b: Array<String> = <!TYPE_MISMATCH, TYPE_MISMATCH!>[1]<!>
+        val b: Array<String> = <!TYPE_MISMATCH!>[1]<!>
 )
diff --git a/compiler/testData/diagnostics/tests/delegation/DelegationExpectedType.fir.kt b/compiler/testData/diagnostics/tests/delegation/DelegationExpectedType.fir.kt
index 90af868..3c39073 100644
--- a/compiler/testData/diagnostics/tests/delegation/DelegationExpectedType.fir.kt
+++ b/compiler/testData/diagnostics/tests/delegation/DelegationExpectedType.fir.kt
@@ -20,6 +20,6 @@
 
 fun <T> boo(t: T): A<T> = AImpl()
 
-class E : A<Int> by <!TYPE_MISMATCH, TYPE_MISMATCH!>boo("")<!>
+class E : A<Int> by <!TYPE_MISMATCH!>boo("")<!>
 
-class F : A<Int> by <!TYPE_MISMATCH, TYPE_MISMATCH, TYPE_MISMATCH!>AImpl<String>()<!>
+class F : A<Int> by <!TYPE_MISMATCH, TYPE_MISMATCH!>AImpl<String>()<!>
diff --git a/compiler/testData/diagnostics/tests/delegation/DelegationToJavaIface.fir.kt b/compiler/testData/diagnostics/tests/delegation/DelegationToJavaIface.fir.kt
index f37772a..fb554a2 100644
--- a/compiler/testData/diagnostics/tests/delegation/DelegationToJavaIface.fir.kt
+++ b/compiler/testData/diagnostics/tests/delegation/DelegationToJavaIface.fir.kt
@@ -3,4 +3,4 @@
 
 class TestIface(r : Runnable) : Runnable by r {}
 
-class TestObject(o : <!PLATFORM_CLASS_MAPPED_TO_KOTLIN!>Object<!>) : <!DELEGATION_NOT_TO_INTERFACE, PLATFORM_CLASS_MAPPED_TO_KOTLIN, PLATFORM_CLASS_MAPPED_TO_KOTLIN, PLATFORM_CLASS_MAPPED_TO_KOTLIN, SUPERTYPE_NOT_INITIALIZED!>Object<!> by o {}
+class TestObject(o : <!PLATFORM_CLASS_MAPPED_TO_KOTLIN!>Object<!>) : <!DELEGATION_NOT_TO_INTERFACE, PLATFORM_CLASS_MAPPED_TO_KOTLIN, PLATFORM_CLASS_MAPPED_TO_KOTLIN, SUPERTYPE_NOT_INITIALIZED!>Object<!> by o {}
diff --git a/compiler/testData/diagnostics/tests/extensions/contextReceivers/conflicting.fir.kt b/compiler/testData/diagnostics/tests/extensions/contextReceivers/conflicting.fir.kt
index b6f76a1..881485a 100644
--- a/compiler/testData/diagnostics/tests/extensions/contextReceivers/conflicting.fir.kt
+++ b/compiler/testData/diagnostics/tests/extensions/contextReceivers/conflicting.fir.kt
@@ -10,7 +10,7 @@
 fun f(): Unit<!> = TODO()
 
 fun test(a: A, b: B) {
-    <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>with<!>(a) {
+    <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>with<!>(a) {
         with(b) {
             <!OVERLOAD_RESOLUTION_AMBIGUITY!>f<!>()
         }
diff --git a/compiler/testData/diagnostics/tests/extensions/contextReceivers/conflictingWithDifferentOrder.fir.kt b/compiler/testData/diagnostics/tests/extensions/contextReceivers/conflictingWithDifferentOrder.fir.kt
index f17e936..3868342 100644
--- a/compiler/testData/diagnostics/tests/extensions/contextReceivers/conflictingWithDifferentOrder.fir.kt
+++ b/compiler/testData/diagnostics/tests/extensions/contextReceivers/conflictingWithDifferentOrder.fir.kt
@@ -10,7 +10,7 @@
 fun f(): Unit = TODO()
 
 fun test(a: A, b: B) {
-    <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>with<!>(a) {
+    <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>with<!>(a) {
         with(b) {
             <!OVERLOAD_RESOLUTION_AMBIGUITY!>f<!>()
         }
diff --git a/compiler/testData/diagnostics/tests/incompleteCode/controlStructuresErrors.fir.kt b/compiler/testData/diagnostics/tests/incompleteCode/controlStructuresErrors.fir.kt
index a07e5ba..e8a8892 100644
--- a/compiler/testData/diagnostics/tests/incompleteCode/controlStructuresErrors.fir.kt
+++ b/compiler/testData/diagnostics/tests/incompleteCode/controlStructuresErrors.fir.kt
@@ -1,6 +1,6 @@
 
 fun test1() {
-    <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>if (<!UNRESOLVED_REFERENCE!>rr<!>) {
+    <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>if (<!UNRESOLVED_REFERENCE!>rr<!>) {
         if (<!UNRESOLVED_REFERENCE!>l<!>) {
             <!UNRESOLVED_REFERENCE!>a<!>.q()
         }
diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/changingResolveIfDontUseBuilderInference.fir.kt b/compiler/testData/diagnostics/tests/inference/builderInference/changingResolveIfDontUseBuilderInference.fir.kt
index c12c2dd..7aa9520 100644
--- a/compiler/testData/diagnostics/tests/inference/builderInference/changingResolveIfDontUseBuilderInference.fir.kt
+++ b/compiler/testData/diagnostics/tests/inference/builderInference/changingResolveIfDontUseBuilderInference.fir.kt
@@ -24,6 +24,6 @@
     } // `Map<CharSequence, String>` if we use builder inference, `Map<String, String>` if we don't
 
     val y: MutableMap<String, CharSequence> = build7 {
-        <!ARGUMENT_TYPE_MISMATCH, TYPE_MISMATCH, TYPE_MISMATCH!>id(run { this })<!>
+        <!ARGUMENT_TYPE_MISMATCH, TYPE_MISMATCH!>id(run { this })<!>
     }
 }
diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferences.fir.kt b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferences.fir.kt
index 866cbc0..35ee734 100644
--- a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferences.fir.kt
+++ b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferences.fir.kt
@@ -185,7 +185,7 @@
 
 fun poll26(flag: Boolean): Flow<String> {
     return flow {
-        val inv = when (flag) { true -> ::<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!> false -> foo7() else -> ::Foo7 }
+        val inv = when (flag) { true -> ::<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!> false -> foo7() else -> ::Foo7 }
         inv
     }
 }
@@ -479,7 +479,7 @@
 
 fun poll86(): Flow<String> {
     return flow {
-        val inv = ::Foo7 in <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>setOf<!>(::<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!>)
+        val inv = ::Foo7 in <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>setOf<!>(::<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!>)
         inv
     }
 }
diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesUnrestricted.fir.kt b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesUnrestricted.fir.kt
index adc7e3b..c489b54 100644
--- a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesUnrestricted.fir.kt
+++ b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesUnrestricted.fir.kt
@@ -187,7 +187,7 @@
 
 fun poll26(flag: Boolean): Flow<String> {
     return flow {
-        val inv = when (flag) { true -> ::<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!> false -> foo7() else -> ::Foo7 }
+        val inv = when (flag) { true -> ::<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!> false -> foo7() else -> ::Foo7 }
         inv
     }
 }
@@ -481,7 +481,7 @@
 
 fun poll86(): Flow<String> {
     return flow {
-        val inv = ::Foo7 in <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>setOf<!>(::<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!>)
+        val inv = ::Foo7 in <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>setOf<!>(::<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!>)
         inv
     }
 }
diff --git a/compiler/testData/diagnostics/tests/inference/completion/postponedArgumentsAnalysis/notInferableParameterOfAnonymousFunction.fir.kt b/compiler/testData/diagnostics/tests/inference/completion/postponedArgumentsAnalysis/notInferableParameterOfAnonymousFunction.fir.kt
index a06ef229..af2dee0 100644
--- a/compiler/testData/diagnostics/tests/inference/completion/postponedArgumentsAnalysis/notInferableParameterOfAnonymousFunction.fir.kt
+++ b/compiler/testData/diagnostics/tests/inference/completion/postponedArgumentsAnalysis/notInferableParameterOfAnonymousFunction.fir.kt
@@ -1,6 +1,6 @@
 // !DIAGNOSTICS: -UNUSED_ANONYMOUS_PARAMETER -UNUSED_VARIABLE
 
-fun <T> select(vararg x: <!CANNOT_INFER_PARAMETER_TYPE, CANNOT_INFER_PARAMETER_TYPE!>T<!>) = x[0]
+fun <T> select(vararg x: <!CANNOT_INFER_PARAMETER_TYPE!>T<!>) = x[0]
 fun <K> id(x: K) = x
 
 fun main() {
diff --git a/compiler/testData/diagnostics/tests/inference/dependantOnVariance.fir.kt b/compiler/testData/diagnostics/tests/inference/dependantOnVariance.fir.kt
index f67ceac..a6208a8 100644
--- a/compiler/testData/diagnostics/tests/inference/dependantOnVariance.fir.kt
+++ b/compiler/testData/diagnostics/tests/inference/dependantOnVariance.fir.kt
@@ -13,7 +13,7 @@
 fun test1(int: Int, any: Any) {
     val a0 : MyList<Any> = getMyList(int)
 
-    val a1 : MyList<Int> = <!TYPE_MISMATCH, TYPE_MISMATCH!>getMyList(any)<!>
+    val a1 : MyList<Int> = <!TYPE_MISMATCH!>getMyList(any)<!>
 
     val a2 : MyList<out Any> = getMyList(int)
 
diff --git a/compiler/testData/diagnostics/tests/inference/nothingType/notEnoughInformationAndNothing.fir.kt b/compiler/testData/diagnostics/tests/inference/nothingType/notEnoughInformationAndNothing.fir.kt
index 43b5c41..945aee7 100644
--- a/compiler/testData/diagnostics/tests/inference/nothingType/notEnoughInformationAndNothing.fir.kt
+++ b/compiler/testData/diagnostics/tests/inference/nothingType/notEnoughInformationAndNothing.fir.kt
@@ -4,7 +4,7 @@
 class Inv<I>
 fun <T> materialize(): Inv<T> = TODO()
 fun <K> id(arg: K) = arg
-fun <S> select(vararg args: <!CANNOT_INFER_PARAMETER_TYPE, CANNOT_INFER_PARAMETER_TYPE!>S<!>): S = TODO()
+fun <S> select(vararg args: <!CANNOT_INFER_PARAMETER_TYPE!>S<!>): S = TODO()
 
 fun test1(b: Boolean?) {
     val v = when(b) {
@@ -26,11 +26,11 @@
         null
     )<!>
     <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>select<!>(
-        <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>materialize<!>(),
+        <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>materialize<!>(),
         materialize()
     )
     select(
-        <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>materialize<!>(),
+        <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>materialize<!>(),
         materialize(),
         null
     )
diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt2200.fir.kt b/compiler/testData/diagnostics/tests/inference/regressions/kt2200.fir.kt
index f7389bc..7609394 100644
--- a/compiler/testData/diagnostics/tests/inference/regressions/kt2200.fir.kt
+++ b/compiler/testData/diagnostics/tests/inference/regressions/kt2200.fir.kt
@@ -5,7 +5,7 @@
 import checkSubtype
 
 fun main() {
-    val a = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>array<!>(array())
+    val a = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>array<!>(array())
     val a0 : Array<Array<Int>> = array(array())
     val a1 = array(array<Int>())
     checkSubtype<Array<Array<Int>>>(a1)
diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt36342.fir.kt b/compiler/testData/diagnostics/tests/inference/regressions/kt36342.fir.kt
index 53bc861..1a6d5ac 100644
--- a/compiler/testData/diagnostics/tests/inference/regressions/kt36342.fir.kt
+++ b/compiler/testData/diagnostics/tests/inference/regressions/kt36342.fir.kt
@@ -7,18 +7,18 @@
     id(<!UNRESOLVED_REFERENCE!>unresolved<!>)!!
     <!UNRESOLVED_REFERENCE!>unresolved<!>!!<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>
     <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>try {
-        <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>id<!>(<!UNRESOLVED_REFERENCE!>unresolved<!>)
+        <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>id<!>(<!UNRESOLVED_REFERENCE!>unresolved<!>)
     } catch (e: Exception) {
         id(<!UNRESOLVED_REFERENCE!>unresolved<!>)
     }<!>
 
     <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>if (true)
-        <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>id<!>(<!UNRESOLVED_REFERENCE!>unresolved<!>)
+        <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>id<!>(<!UNRESOLVED_REFERENCE!>unresolved<!>)
     else
         id(<!UNRESOLVED_REFERENCE!>unresolved<!>)<!>
 
     when {
         true -> id(<!UNRESOLVED_REFERENCE!>unresolved<!>)
     }
-    <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!><!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>id<!>(<!UNRESOLVED_REFERENCE!>unresolved<!>) ?: id(<!UNRESOLVED_REFERENCE!>unresolved<!>)<!>
+    <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!><!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>id<!>(<!UNRESOLVED_REFERENCE!>unresolved<!>) ?: id(<!UNRESOLVED_REFERENCE!>unresolved<!>)<!>
 }
diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt36342_2.fir.kt b/compiler/testData/diagnostics/tests/inference/regressions/kt36342_2.fir.kt
index 2d63f5c..a04c8b0c 100644
--- a/compiler/testData/diagnostics/tests/inference/regressions/kt36342_2.fir.kt
+++ b/compiler/testData/diagnostics/tests/inference/regressions/kt36342_2.fir.kt
@@ -3,7 +3,7 @@
 fun <M> materialize(): M = TODO()
 
 fun test(b: Boolean) {
-    <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>id<!>(if (b) {
+    <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>id<!>(if (b) {
         id(<!UNRESOLVED_REFERENCE!>unresolved<!>)
     } else {
         id(
diff --git a/compiler/testData/diagnostics/tests/inference/reportNotEnoughTypeInformationErrorsOnBlockExpressions.fir.kt b/compiler/testData/diagnostics/tests/inference/reportNotEnoughTypeInformationErrorsOnBlockExpressions.fir.kt
index a573fde..b9fb7c5 100644
--- a/compiler/testData/diagnostics/tests/inference/reportNotEnoughTypeInformationErrorsOnBlockExpressions.fir.kt
+++ b/compiler/testData/diagnostics/tests/inference/reportNotEnoughTypeInformationErrorsOnBlockExpressions.fir.kt
@@ -14,7 +14,7 @@
 }
 
 fun poll26(flag: Boolean): Any? {
-    val inv = when (flag) { true -> ::<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!> false -> foo7() else -> ::Foo7 }
+    val inv = when (flag) { true -> ::<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!> false -> foo7() else -> ::Foo7 }
     return inv
 }
 
diff --git a/compiler/testData/diagnostics/tests/inference/specialCallsWithCallableReferences.fir.kt b/compiler/testData/diagnostics/tests/inference/specialCallsWithCallableReferences.fir.kt
index 8cb33e9..d0a0506 100644
--- a/compiler/testData/diagnostics/tests/inference/specialCallsWithCallableReferences.fir.kt
+++ b/compiler/testData/diagnostics/tests/inference/specialCallsWithCallableReferences.fir.kt
@@ -94,7 +94,7 @@
 }
 
 fun poll26(flag: Boolean) {
-    val inv = when (flag) { true -> ::<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!> false -> foo7() else -> ::Foo7 }
+    val inv = when (flag) { true -> ::<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!> false -> foo7() else -> ::Foo7 }
     inv
 }
 
@@ -304,7 +304,7 @@
 }
 
 fun poll86() {
-    val inv = ::Foo7 in <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>setOf<!>(::<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!>)
+    val inv = ::Foo7 in <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>setOf<!>(::<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>Foo7<!>)
     inv
 }
 
diff --git a/compiler/testData/diagnostics/tests/inference/underscoredTypeInForbiddenPositions.fir.kt b/compiler/testData/diagnostics/tests/inference/underscoredTypeInForbiddenPositions.fir.kt
index 12a135a..65b7dbe 100644
--- a/compiler/testData/diagnostics/tests/inference/underscoredTypeInForbiddenPositions.fir.kt
+++ b/compiler/testData/diagnostics/tests/inference/underscoredTypeInForbiddenPositions.fir.kt
@@ -36,7 +36,7 @@
 fun Foo<Foo<<!UNRESOLVED_REFERENCE!>_<!>>>.foo12() {}
 
 class AA1 : <!UNRESOLVED_REFERENCE!>_<!>
-class AA2 : <!FINAL_SUPERTYPE, SUPERTYPE_NOT_INITIALIZED!>Foo<<!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>_<!>><!>
+class AA2 : <!FINAL_SUPERTYPE, SUPERTYPE_NOT_INITIALIZED!>Foo<<!UNRESOLVED_REFERENCE!>_<!>><!>
 
 fun <`_`> bar(): Foo<<!UNDERSCORE_USAGE_WITHOUT_BACKTICKS!>_<!>> = TODO()
 fun <`_`> bar1(): Foo<Foo<<!UNDERSCORE_USAGE_WITHOUT_BACKTICKS!>_<!>>> = TODO()
diff --git a/compiler/testData/diagnostics/tests/inference/upperBounds/typeParameterAsUpperBound.fir.kt b/compiler/testData/diagnostics/tests/inference/upperBounds/typeParameterAsUpperBound.fir.kt
index 495db2b..c37f176 100644
--- a/compiler/testData/diagnostics/tests/inference/upperBounds/typeParameterAsUpperBound.fir.kt
+++ b/compiler/testData/diagnostics/tests/inference/upperBounds/typeParameterAsUpperBound.fir.kt
@@ -1,7 +1,7 @@
 // !CHECK_TYPE
 
 
-@kotlin.internal.<!INVISIBLE_REFERENCE, INVISIBLE_REFERENCE!>InlineOnly<!>
+@kotlin.internal.<!INVISIBLE_REFERENCE!>InlineOnly<!>
 public inline fun <C, R> C.ifEmpty(f: () -> R): R where C : Collection<*>, C : R = if (isEmpty()) f() else this
 
 public fun <T> listOf(t: T): List<T> = TODO()
diff --git a/compiler/testData/diagnostics/tests/override/MissingDelegate.fir.kt b/compiler/testData/diagnostics/tests/override/MissingDelegate.fir.kt
index 54a5e46..bb05ef4 100644
--- a/compiler/testData/diagnostics/tests/override/MissingDelegate.fir.kt
+++ b/compiler/testData/diagnostics/tests/override/MissingDelegate.fir.kt
@@ -1,3 +1,3 @@
-class C : <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>Base1<!> by <!UNRESOLVED_REFERENCE!>Base2<!>(1) {
+class C : <!UNRESOLVED_REFERENCE!>Base1<!> by <!UNRESOLVED_REFERENCE!>Base2<!>(1) {
   fun test() { }
-}
\ No newline at end of file
+}
diff --git a/compiler/testData/diagnostics/tests/privateInFile/topLevelAnnotationCall.fir.kt b/compiler/testData/diagnostics/tests/privateInFile/topLevelAnnotationCall.fir.kt
index 88ec870..f95ca28 100644
--- a/compiler/testData/diagnostics/tests/privateInFile/topLevelAnnotationCall.fir.kt
+++ b/compiler/testData/diagnostics/tests/privateInFile/topLevelAnnotationCall.fir.kt
@@ -17,11 +17,11 @@
 // FILE: 2.kt
 package pp
 
-@<!INVISIBLE_REFERENCE, INVISIBLE_REFERENCE!>A<!>(<!INVISIBLE_REFERENCE!>foo<!>)
+@<!INVISIBLE_REFERENCE!>A<!>(<!INVISIBLE_REFERENCE!>foo<!>)
 fun f2() {}
 
-@<!INVISIBLE_REFERENCE, INVISIBLE_REFERENCE!>A<!>(<!INVISIBLE_REFERENCE!>foo<!>)
+@<!INVISIBLE_REFERENCE!>A<!>(<!INVISIBLE_REFERENCE!>foo<!>)
 val p2 = ""
 
-@<!INVISIBLE_REFERENCE, INVISIBLE_REFERENCE!>A<!>(<!INVISIBLE_REFERENCE!>foo<!>)
+@<!INVISIBLE_REFERENCE!>A<!>(<!INVISIBLE_REFERENCE!>foo<!>)
 class C2
diff --git a/compiler/testData/diagnostics/tests/secondaryConstructors/constructorCallType.fir.kt b/compiler/testData/diagnostics/tests/secondaryConstructors/constructorCallType.fir.kt
index 23157e9..6d60164 100644
--- a/compiler/testData/diagnostics/tests/secondaryConstructors/constructorCallType.fir.kt
+++ b/compiler/testData/diagnostics/tests/secondaryConstructors/constructorCallType.fir.kt
@@ -20,7 +20,7 @@
 
 val y5: B<String> = B<String>(<!ARGUMENT_TYPE_MISMATCH!>1<!>)
 val y6: B<String> = B<String>("")
-val y7: B<String> = <!TYPE_MISMATCH, TYPE_MISMATCH!>B(1)<!>
+val y7: B<String> = <!TYPE_MISMATCH!>B(1)<!>
 val y8: B<String> = B("")
 
 val y9 = B(1)
diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/noMultiplatformProjects.fir.kt b/compiler/testData/diagnostics/tests/sourceCompatibility/noMultiplatformProjects.fir.kt
index 0224f21..371ed9c 100644
--- a/compiler/testData/diagnostics/tests/sourceCompatibility/noMultiplatformProjects.fir.kt
+++ b/compiler/testData/diagnostics/tests/sourceCompatibility/noMultiplatformProjects.fir.kt
@@ -8,7 +8,7 @@
 
 <!NOT_A_MULTIPLATFORM_COMPILATION!>expect<!> class ExplicitExpect {
     <!NOT_A_MULTIPLATFORM_COMPILATION, WRONG_MODIFIER_TARGET!>expect<!> fun explicitFoo()
-    <!NOT_A_MULTIPLATFORM_COMPILATION, NOT_A_MULTIPLATFORM_COMPILATION, NOT_A_MULTIPLATFORM_COMPILATION, WRONG_MODIFIER_TARGET!>expect<!> val explicitX: Int
+    <!NOT_A_MULTIPLATFORM_COMPILATION, NOT_A_MULTIPLATFORM_COMPILATION, WRONG_MODIFIER_TARGET!>expect<!> val explicitX: Int
     <!NOT_A_MULTIPLATFORM_COMPILATION, WRONG_MODIFIER_TARGET!>expect<!> class ExplicitInner
 }
 
@@ -21,4 +21,4 @@
     }
     <!NOT_A_MULTIPLATFORM_COMPILATION!>actual<!> val x: Int = 0
     <!NOT_A_MULTIPLATFORM_COMPILATION!>actual<!> class Inner
-}
\ No newline at end of file
+}
diff --git a/compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/Deprecated.fir.kt b/compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/Deprecated.fir.kt
index 208bc7a..a3dd846 100644
--- a/compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/Deprecated.fir.kt
+++ b/compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/Deprecated.fir.kt
@@ -12,11 +12,11 @@
 
     javaClass.<!DEPRECATION!>something4<!>
     javaClass.<!DEPRECATION!>something4<!> = 1
-    javaClass.<!DEPRECATION, DEPRECATION!>something4<!>++
+    javaClass.<!DEPRECATION!>something4<!>++
 
     javaClass.<!DEPRECATION!>something5<!>
     javaClass.<!DEPRECATION!>something5<!> = 1
-    javaClass.<!DEPRECATION, DEPRECATION!>something5<!>++
+    javaClass.<!DEPRECATION!>something5<!>++
 }
 
 // FILE: JavaClass.java
diff --git a/compiler/testData/diagnostics/tests/typeParameters/kt42042Error.fir.kt b/compiler/testData/diagnostics/tests/typeParameters/kt42042Error.fir.kt
index c4018ff..8d7d49a 100644
--- a/compiler/testData/diagnostics/tests/typeParameters/kt42042Error.fir.kt
+++ b/compiler/testData/diagnostics/tests/typeParameters/kt42042Error.fir.kt
@@ -8,6 +8,6 @@
 }
 
 fun <A, B> unsafeCast(value: A): B {
-    val proof: Subtype<A, B> = <!TYPE_MISMATCH, TYPE_MISMATCH!>Subtype.Trivial()<!>
+    val proof: Subtype<A, B> = <!TYPE_MISMATCH!>Subtype.Trivial()<!>
     return proof.cast(value)
 }
diff --git a/compiler/testData/diagnostics/tests/typealias/abbreviatedSupertypes.fir.kt b/compiler/testData/diagnostics/tests/typealias/abbreviatedSupertypes.fir.kt
index d7738eb..37e1384 100644
--- a/compiler/testData/diagnostics/tests/typealias/abbreviatedSupertypes.fir.kt
+++ b/compiler/testData/diagnostics/tests/typealias/abbreviatedSupertypes.fir.kt
@@ -9,19 +9,19 @@
 typealias Both<T, K> = TK<T, K>
 typealias BothList<T, K> = List<TK<T, K>>
 
-object O1 : One<<!UPPER_BOUND_VIOLATED, UPPER_BOUND_VIOLATED!>Any<!>>() // compiler error expected
+object O1 : One<<!UPPER_BOUND_VIOLATED!>Any<!>>() // compiler error expected
 object O2 : Both<<!UPPER_BOUND_VIOLATED!>Any<!>, <!UPPER_BOUND_VIOLATED!>Any<!>>()
 
-class A1<T : One<<!UPPER_BOUND_VIOLATED, UPPER_BOUND_VIOLATED!>Any<!>>>
+class A1<T : One<<!UPPER_BOUND_VIOLATED!>Any<!>>>
 class A2<T : One<!WRONG_NUMBER_OF_TYPE_ARGUMENTS!><Any, Any><!>>
 
-interface IO1 : OneList<<!UPPER_BOUND_VIOLATED, UPPER_BOUND_VIOLATED!>Any<!>> {}
+interface IO1 : OneList<<!UPPER_BOUND_VIOLATED!>Any<!>> {}
 interface IO2 : BothList<<!UPPER_BOUND_VIOLATED!>Any<!>, <!UPPER_BOUND_VIOLATED!>Any<!>> {}
 
-fun foo1(x: One<<!UPPER_BOUND_VIOLATED, UPPER_BOUND_VIOLATED!>Any<!>>) {}
+fun foo1(x: One<<!UPPER_BOUND_VIOLATED!>Any<!>>) {}
 fun foo2(x: Both<<!UPPER_BOUND_VIOLATED!>Any<!>, <!UPPER_BOUND_VIOLATED!>Any<!>>) {}
 
 fun main() {
-    One<<!UPPER_BOUND_VIOLATED, UPPER_BOUND_VIOLATED!>Any<!>>()
+    One<<!UPPER_BOUND_VIOLATED!>Any<!>>()
     Both<<!UPPER_BOUND_VIOLATED!>Any<!>, <!UPPER_BOUND_VIOLATED!>Any<!>>()
 }
diff --git a/compiler/testData/diagnostics/tests/typealias/abbreviatedSupertypesErrors.fir.kt b/compiler/testData/diagnostics/tests/typealias/abbreviatedSupertypesErrors.fir.kt
index cc0ed68..c454102 100644
--- a/compiler/testData/diagnostics/tests/typealias/abbreviatedSupertypesErrors.fir.kt
+++ b/compiler/testData/diagnostics/tests/typealias/abbreviatedSupertypesErrors.fir.kt
@@ -9,19 +9,19 @@
 typealias Both<T, K> = TK<T, K>
 typealias BothList<T, K> = List<TK<T, K>>
 
-object O1 : One<<!UPPER_BOUND_VIOLATED, UPPER_BOUND_VIOLATED!>Any<!>>() // compiler error expected
+object O1 : One<<!UPPER_BOUND_VIOLATED!>Any<!>>() // compiler error expected
 object O2 : Both<<!UPPER_BOUND_VIOLATED!>Any<!>, <!UPPER_BOUND_VIOLATED!>Any<!>>()
 
-class A1<T : One<<!UPPER_BOUND_VIOLATED, UPPER_BOUND_VIOLATED!>Any<!>>>
+class A1<T : One<<!UPPER_BOUND_VIOLATED!>Any<!>>>
 class A2<T : One<!WRONG_NUMBER_OF_TYPE_ARGUMENTS!><Any, Any><!>>
 
-interface IO1 : OneList<<!UPPER_BOUND_VIOLATED, UPPER_BOUND_VIOLATED!>Any<!>> {}
+interface IO1 : OneList<<!UPPER_BOUND_VIOLATED!>Any<!>> {}
 interface IO2 : BothList<<!UPPER_BOUND_VIOLATED!>Any<!>, <!UPPER_BOUND_VIOLATED!>Any<!>> {}
 
-fun foo1(x: One<<!UPPER_BOUND_VIOLATED, UPPER_BOUND_VIOLATED!>Any<!>>) {}
+fun foo1(x: One<<!UPPER_BOUND_VIOLATED!>Any<!>>) {}
 fun foo2(x: Both<<!UPPER_BOUND_VIOLATED!>Any<!>, <!UPPER_BOUND_VIOLATED!>Any<!>>) {}
 
 fun main() {
-    One<<!UPPER_BOUND_VIOLATED, UPPER_BOUND_VIOLATED!>Any<!>>()
+    One<<!UPPER_BOUND_VIOLATED!>Any<!>>()
     Both<<!UPPER_BOUND_VIOLATED!>Any<!>, <!UPPER_BOUND_VIOLATED!>Any<!>>()
 }
diff --git a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInferenceWithNestedCalls.fir.kt b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInferenceWithNestedCalls.fir.kt
index c21845f..8c80210 100644
--- a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInferenceWithNestedCalls.fir.kt
+++ b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInferenceWithNestedCalls.fir.kt
@@ -16,4 +16,4 @@
 val test1 = C(1, C(2, null))
 val test2 = C(1, C(<!ARGUMENT_TYPE_MISMATCH!>""<!>, null))
 val test23 = C2(<!ARGUMENT_TYPE_MISMATCH!>if (true) 1 else null<!>)
-val test234 = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>C2<!>(C2(<!ARGUMENT_TYPE_MISMATCH!>if (true) 1 else null<!>))
+val test234 = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>C2<!>(C2(<!ARGUMENT_TYPE_MISMATCH!>if (true) 1 else null<!>))
diff --git a/compiler/testData/diagnostics/tests/when/kt9972.fir.kt b/compiler/testData/diagnostics/tests/when/kt9972.fir.kt
index 84fdfb8..079c5b2 100644
--- a/compiler/testData/diagnostics/tests/when/kt9972.fir.kt
+++ b/compiler/testData/diagnostics/tests/when/kt9972.fir.kt
@@ -20,7 +20,7 @@
 }
 
 fun test2(): Int {
-    val x: String = <!INITIALIZER_TYPE_MISMATCH, TYPE_MISMATCH, TYPE_MISMATCH!><!TYPE_MISMATCH!>when {
+    val x: String = <!INITIALIZER_TYPE_MISMATCH, TYPE_MISMATCH!><!TYPE_MISMATCH!>when {
                         true -> <!TYPE_MISMATCH!>Any()<!>
                         else -> null
                     }<!> ?: return 0<!>
diff --git a/compiler/testData/diagnostics/testsWithStdLib/experimental/implicitUsages.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/experimental/implicitUsages.fir.kt
index 2a41fcb..5c938da 100644
--- a/compiler/testData/diagnostics/testsWithStdLib/experimental/implicitUsages.fir.kt
+++ b/compiler/testData/diagnostics/testsWithStdLib/experimental/implicitUsages.fir.kt
@@ -92,7 +92,7 @@
     operator fun provideDelegate(x: Any?, y: Any?): C = C()
 }
 
-val x: String by <!OPT_IN_USAGE_ERROR, OPT_IN_USAGE_ERROR!>O<!>
+val x: String by <!OPT_IN_USAGE_ERROR!>O<!>
 
 @Marker
 class OperatorContainer : Comparable<OperatorContainer> {
@@ -128,5 +128,5 @@
     val res1 = s <!OPT_IN_USAGE_ERROR!>-<!> s
     val res2 = <!OPT_IN_USAGE_ERROR!>s<!>()
     val res3 = <!OPT_IN_USAGE_ERROR!>res1<!> <!OPT_IN_USAGE_ERROR!>><!> <!OPT_IN_USAGE_ERROR!>res2<!>
-    for (c in <!OPT_IN_USAGE_ERROR, OPT_IN_USAGE_ERROR, OPT_IN_USAGE_ERROR, OPT_IN_USAGE_ERROR, OPT_IN_USAGE_ERROR!>a<!>) {}
+    for (c in <!OPT_IN_USAGE_ERROR!>a<!>) {}
 }
diff --git a/compiler/testData/diagnostics/testsWithStdLib/experimental/implicitUsagesFuture.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/experimental/implicitUsagesFuture.fir.kt
index 1947962..7d855ed 100644
--- a/compiler/testData/diagnostics/testsWithStdLib/experimental/implicitUsagesFuture.fir.kt
+++ b/compiler/testData/diagnostics/testsWithStdLib/experimental/implicitUsagesFuture.fir.kt
@@ -92,7 +92,7 @@
     operator fun provideDelegate(x: Any?, y: Any?): C = C()
 }
 
-val x: String by <!OPT_IN_USAGE_ERROR, OPT_IN_USAGE_ERROR!>O<!>
+val x: String by <!OPT_IN_USAGE_ERROR!>O<!>
 
 @Marker
 class OperatorContainer : Comparable<OperatorContainer> {
@@ -128,5 +128,5 @@
     val res1 = s <!OPT_IN_USAGE_ERROR!>-<!> s
     val res2 = <!OPT_IN_USAGE_ERROR!>s<!>()
     val res3 = <!OPT_IN_USAGE_ERROR!>res1<!> <!OPT_IN_USAGE_ERROR!>><!> <!OPT_IN_USAGE_ERROR!>res2<!>
-    for (c in <!OPT_IN_USAGE_ERROR, OPT_IN_USAGE_ERROR, OPT_IN_USAGE_ERROR, OPT_IN_USAGE_ERROR, OPT_IN_USAGE_ERROR!>a<!>) {}
+    for (c in <!OPT_IN_USAGE_ERROR!>a<!>) {}
 }
diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-8/neg/1.1.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-8/neg/1.1.fir.kt
index e7649d2..0c4f4d2 100644
--- a/compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-8/neg/1.1.fir.kt
+++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-8/neg/1.1.fir.kt
@@ -28,7 +28,7 @@
 
 fun case1() {
     val tryVal: B<String> =
-    <!TYPE_MISMATCH, TYPE_MISMATCH!>try {
+    <!TYPE_MISMATCH!>try {
         throwExceptionA(false)
         A("")
     } catch (e: Exception) {
@@ -55,7 +55,7 @@
 
 fun case2() {
     val tryVal: A<String> =
-    <!TYPE_MISMATCH, TYPE_MISMATCH!>try {
+    <!TYPE_MISMATCH!>try {
         throwExceptionA(false)
         A("")
     } catch (e: Exception) {
@@ -79,7 +79,7 @@
 
 fun case3() {
     val tryVal: A<Int> =
-    <!TYPE_MISMATCH, TYPE_MISMATCH, TYPE_MISMATCH, TYPE_MISMATCH!>try {
+    <!TYPE_MISMATCH!>try {
         throwExceptionA(false)
         A(2)
     } catch (e: ExcA) {