[K2] Stop reporting NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS when there are more than one matching actuals

KT-66723

NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS is a frontend error.
AMBIGUOUS_ACTUALS is a backend error. If we report a error on frontend
than we never get a chance to report error on backend

The commit improves the error reporting, because previously it wasn't
obvious that AMBIGUOUS_ACTUALS is the real problem.
diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFE10TestdataTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFE10TestdataTestGenerated.java
index ebc7b88..ad6cce6 100644
--- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFE10TestdataTestGenerated.java
+++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFE10TestdataTestGenerated.java
@@ -25237,6 +25237,12 @@
       }
 
       @Test
+      @TestMetadata("ambiguousActualsJavaPrimitiveIntTypeVsIntegerObject.kt")
+      public void testAmbiguousActualsJavaPrimitiveIntTypeVsIntegerObject() {
+        runTest("compiler/testData/diagnostics/tests/multiplatform/ambiguousActualsJavaPrimitiveIntTypeVsIntegerObject.kt");
+      }
+
+      @Test
       @TestMetadata("annotationArgArrayVsOutArray.kt")
       public void testAnnotationArgArrayVsOutArray() {
         runTest("compiler/testData/diagnostics/tests/multiplatform/annotationArgArrayVsOutArray.kt");
diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated.java
index dccbe05..ce48fe4 100644
--- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated.java
+++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated.java
@@ -25237,6 +25237,12 @@
       }
 
       @Test
+      @TestMetadata("ambiguousActualsJavaPrimitiveIntTypeVsIntegerObject.kt")
+      public void testAmbiguousActualsJavaPrimitiveIntTypeVsIntegerObject() {
+        runTest("compiler/testData/diagnostics/tests/multiplatform/ambiguousActualsJavaPrimitiveIntTypeVsIntegerObject.kt");
+      }
+
+      @Test
       @TestMetadata("annotationArgArrayVsOutArray.kt")
       public void testAnnotationArgArrayVsOutArray() {
         runTest("compiler/testData/diagnostics/tests/multiplatform/annotationArgArrayVsOutArray.kt");
diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendMPPDiagnosticsWithLightTreeTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendMPPDiagnosticsWithLightTreeTestGenerated.java
index 11ee280..a6b85da 100644
--- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendMPPDiagnosticsWithLightTreeTestGenerated.java
+++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendMPPDiagnosticsWithLightTreeTestGenerated.java
@@ -80,6 +80,12 @@
   }
 
   @Test
+  @TestMetadata("ambiguousActualsJavaPrimitiveIntTypeVsIntegerObject.kt")
+  public void testAmbiguousActualsJavaPrimitiveIntTypeVsIntegerObject() {
+    runTest("compiler/testData/diagnostics/tests/multiplatform/ambiguousActualsJavaPrimitiveIntTypeVsIntegerObject.kt");
+  }
+
+  @Test
   @TestMetadata("annotationArgArrayVsOutArray.kt")
   public void testAnnotationArgArrayVsOutArray() {
     runTest("compiler/testData/diagnostics/tests/multiplatform/annotationArgArrayVsOutArray.kt");
diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendMPPDiagnosticsWithPsiTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendMPPDiagnosticsWithPsiTestGenerated.java
index 3a7a0a9..86d5433 100644
--- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendMPPDiagnosticsWithPsiTestGenerated.java
+++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirOldFrontendMPPDiagnosticsWithPsiTestGenerated.java
@@ -80,6 +80,12 @@
   }
 
   @Test
+  @TestMetadata("ambiguousActualsJavaPrimitiveIntTypeVsIntegerObject.kt")
+  public void testAmbiguousActualsJavaPrimitiveIntTypeVsIntegerObject() {
+    runTest("compiler/testData/diagnostics/tests/multiplatform/ambiguousActualsJavaPrimitiveIntTypeVsIntegerObject.kt");
+  }
+
+  @Test
   @TestMetadata("annotationArgArrayVsOutArray.kt")
   public void testAnnotationArgArrayVsOutArray() {
     runTest("compiler/testData/diagnostics/tests/multiplatform/annotationArgArrayVsOutArray.kt");
diff --git a/compiler/resolution.common/src/org/jetbrains/kotlin/resolve/calls/mpp/AbstractExpectActualChecker.kt b/compiler/resolution.common/src/org/jetbrains/kotlin/resolve/calls/mpp/AbstractExpectActualChecker.kt
index f4d83ca..c583c67 100644
--- a/compiler/resolution.common/src/org/jetbrains/kotlin/resolve/calls/mpp/AbstractExpectActualChecker.kt
+++ b/compiler/resolution.common/src/org/jetbrains/kotlin/resolve/calls/mpp/AbstractExpectActualChecker.kt
@@ -194,10 +194,10 @@
                 mismatchedMembers,
             )
 
-            if (matched != null) {
+            matched.forEach {
                 checkSingleExpectAgainstMatchedActual(
                     expectMember,
-                    matched,
+                    it,
                     substitutor,
                     expectClassSymbol,
                     actualClassSymbol,
diff --git a/compiler/resolution.common/src/org/jetbrains/kotlin/resolve/calls/mpp/AbstractExpectActualMatcher.kt b/compiler/resolution.common/src/org/jetbrains/kotlin/resolve/calls/mpp/AbstractExpectActualMatcher.kt
index 67a5c89..b450bc7 100644
--- a/compiler/resolution.common/src/org/jetbrains/kotlin/resolve/calls/mpp/AbstractExpectActualMatcher.kt
+++ b/compiler/resolution.common/src/org/jetbrains/kotlin/resolve/calls/mpp/AbstractExpectActualMatcher.kt
@@ -56,7 +56,7 @@
             expectClassSymbol = null,
             actualClassSymbol = null,
             mismatchedMembers = null,
-        )
+        ).singleOrNull()
     }
 
     fun matchClassifiers(
@@ -75,9 +75,7 @@
     }
 
     /**
-     * Besides returning the matched declaration
-     *
-     * The function has an additional side effects:
+     * Besides returning the matched declarations, the function has an additional side effects:
      * - It adds mismatched members to `mismatchedMembers`
      * - It calls `onMatchedMembers` and `onMismatchedMembersFromClassScope` callbacks
      */
@@ -88,7 +86,7 @@
         expectClassSymbol: RegularClassSymbolMarker?,
         actualClassSymbol: RegularClassSymbolMarker?,
         mismatchedMembers: MutableList<Pair<DeclarationSymbolMarker, Map<ExpectActualMatchingCompatibility.Mismatch, List<DeclarationSymbolMarker?>>>>?,
-    ): DeclarationSymbolMarker? {
+    ): List<DeclarationSymbolMarker> {
         val mapping = actualMembers.keysToMap { actualMember ->
             when (expectMember) {
                 is CallableSymbolMarker -> getCallablesCompatibility(
@@ -118,11 +116,13 @@
             }
         }
 
-        matched.singleOrNull()?.let { return it }
+        if (matched.isNotEmpty()) {
+            return matched
+        }
 
         mismatchedMembers?.add(expectMember to mismatched)
         onMismatchedMembersFromClassScope(expectMember, mismatched, expectClassSymbol, actualClassSymbol)
-        return null
+        return emptyList()
     }
 
     private fun ExpectActualMatchingContext<*>.getCallablesCompatibility(
diff --git a/compiler/testData/diagnostics/tests/multiplatform/actualClassifierMustHasTheSameMembersAsNonFinalExpectClassifierChecker/injectContextReceiverOverload.fir.kt b/compiler/testData/diagnostics/tests/multiplatform/actualClassifierMustHasTheSameMembersAsNonFinalExpectClassifierChecker/injectContextReceiverOverload.fir.kt
index 5e911ee..a7f8b22 100644
--- a/compiler/testData/diagnostics/tests/multiplatform/actualClassifierMustHasTheSameMembersAsNonFinalExpectClassifierChecker/injectContextReceiverOverload.fir.kt
+++ b/compiler/testData/diagnostics/tests/multiplatform/actualClassifierMustHasTheSameMembersAsNonFinalExpectClassifierChecker/injectContextReceiverOverload.fir.kt
@@ -9,7 +9,7 @@
 // MODULE: m2-jvm()()(m1-common)
 // FILE: jvm.kt
 
-actual open class <!NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS!>Foo<!> {
+actual open class Foo {
     actual fun foo() {}
 
     // Expected: NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING.
diff --git a/compiler/testData/diagnostics/tests/multiplatform/ambiguousActualsJavaPrimitiveIntTypeVsIntegerObject.fir.kt b/compiler/testData/diagnostics/tests/multiplatform/ambiguousActualsJavaPrimitiveIntTypeVsIntegerObject.fir.kt
new file mode 100644
index 0000000..189fd14
--- /dev/null
+++ b/compiler/testData/diagnostics/tests/multiplatform/ambiguousActualsJavaPrimitiveIntTypeVsIntegerObject.fir.kt
@@ -0,0 +1,16 @@
+// MODULE: m1-common
+// FILE: common.kt
+
+expect class Foo {
+    <!AMBIGUOUS_ACTUALS{JVM}!>fun push(value: Int)<!>
+}
+
+// MODULE: m2-jvm()()(m1-common)
+// FILE: jvm.kt
+actual typealias Foo = FooImpl
+
+// FILE: FooImpl.java
+public class FooImpl {
+    public void push(int value) {}
+    public void push(Integer value) {}
+}
diff --git a/compiler/testData/diagnostics/tests/multiplatform/ambiguousActualsJavaPrimitiveIntTypeVsIntegerObject.kt b/compiler/testData/diagnostics/tests/multiplatform/ambiguousActualsJavaPrimitiveIntTypeVsIntegerObject.kt
new file mode 100644
index 0000000..e10f58c
--- /dev/null
+++ b/compiler/testData/diagnostics/tests/multiplatform/ambiguousActualsJavaPrimitiveIntTypeVsIntegerObject.kt
@@ -0,0 +1,16 @@
+// MODULE: m1-common
+// FILE: common.kt
+
+expect class Foo {
+    fun <!AMBIGUOUS_ACTUALS{JVM}!>push<!>(value: Int)
+}
+
+// MODULE: m2-jvm()()(m1-common)
+// FILE: jvm.kt
+actual typealias Foo = FooImpl
+
+// FILE: FooImpl.java
+public class FooImpl {
+    public void push(int value) {}
+    public void push(Integer value) {}
+}
diff --git a/compiler/testData/diagnostics/tests/multiplatform/ambiguousActualsJavaPrimitiveIntTypeVsIntegerObject.ll.kt b/compiler/testData/diagnostics/tests/multiplatform/ambiguousActualsJavaPrimitiveIntTypeVsIntegerObject.ll.kt
new file mode 100644
index 0000000..7c4c36a
--- /dev/null
+++ b/compiler/testData/diagnostics/tests/multiplatform/ambiguousActualsJavaPrimitiveIntTypeVsIntegerObject.ll.kt
@@ -0,0 +1,16 @@
+// MODULE: m1-common
+// FILE: common.kt
+
+expect class Foo {
+    fun push(value: Int)
+}
+
+// MODULE: m2-jvm()()(m1-common)
+// FILE: jvm.kt
+actual typealias Foo = FooImpl
+
+// FILE: FooImpl.java
+public class FooImpl {
+    public void push(int value) {}
+    public void push(Integer value) {}
+}
diff --git a/compiler/testData/diagnostics/tests/multiplatform/hmpp/ambiguousActuals.fir.kt b/compiler/testData/diagnostics/tests/multiplatform/hmpp/ambiguousActuals.fir.kt
index f10067e..ca15eac 100644
--- a/compiler/testData/diagnostics/tests/multiplatform/hmpp/ambiguousActuals.fir.kt
+++ b/compiler/testData/diagnostics/tests/multiplatform/hmpp/ambiguousActuals.fir.kt
@@ -1,6 +1,6 @@
 // MODULE: common
 // TARGET_PLATFORM: Common
-<!AMBIGUOUS_ACTUALS{JVM}, NO_ACTUAL_FOR_EXPECT{JVM}!>expect fun foo()<!>
+<!AMBIGUOUS_ACTUALS{JVM}!>expect fun foo()<!>
 
 // MODULE: intermediate()()(common)
 // TARGET_PLATFORM: Common
diff --git a/compiler/testData/diagnostics/tests/multiplatform/scopes/methodsConflictingOverloads.fir.kt b/compiler/testData/diagnostics/tests/multiplatform/scopes/methodsConflictingOverloads.fir.kt
index c020d81..5962d3d 100644
--- a/compiler/testData/diagnostics/tests/multiplatform/scopes/methodsConflictingOverloads.fir.kt
+++ b/compiler/testData/diagnostics/tests/multiplatform/scopes/methodsConflictingOverloads.fir.kt
@@ -10,9 +10,9 @@
 
 expect class C : B
 
-<!EXPECT_ACTUAL_INCOMPATIBILITY{JVM}!>expect abstract class D() {
-    <!AMBIGUOUS_ACTUALS{JVM}, NO_ACTUAL_FOR_EXPECT{JVM}!>fun foo()<!>
-}<!>
+expect abstract class D() {
+    <!AMBIGUOUS_ACTUALS{JVM}!>fun foo()<!>
+}
 
 class E : D()
 
@@ -32,7 +32,7 @@
 
 actual class C : B(), I {}
 
-actual abstract class <!NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS!>D<!> {
+actual abstract class D {
     <!CONFLICTING_OVERLOADS!>actual fun foo()<!> {}
     <!CONFLICTING_OVERLOADS!>fun <!ACTUAL_MISSING!>foo<!>()<!> {}
 }
diff --git a/compiler/testData/diagnostics/tests/multiplatform/scopes/methodsConflictingOverloads.ll.kt b/compiler/testData/diagnostics/tests/multiplatform/scopes/methodsConflictingOverloads.ll.kt
index b74038a..73cb816 100644
--- a/compiler/testData/diagnostics/tests/multiplatform/scopes/methodsConflictingOverloads.ll.kt
+++ b/compiler/testData/diagnostics/tests/multiplatform/scopes/methodsConflictingOverloads.ll.kt
@@ -32,7 +32,7 @@
 
 actual class C : B(), I {}
 
-actual abstract class <!NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS!>D<!> {
+actual abstract class D {
     <!CONFLICTING_OVERLOADS!>actual fun foo()<!> {}
     <!CONFLICTING_OVERLOADS!>fun <!ACTUAL_MISSING!>foo<!>()<!> {}
 }
diff --git a/compiler/testData/diagnostics/tests/multiplatform/scopes/nestedClassesRedeclaration.fir.kt b/compiler/testData/diagnostics/tests/multiplatform/scopes/nestedClassesRedeclaration.fir.kt
index a1fa605..e2462fd 100644
--- a/compiler/testData/diagnostics/tests/multiplatform/scopes/nestedClassesRedeclaration.fir.kt
+++ b/compiler/testData/diagnostics/tests/multiplatform/scopes/nestedClassesRedeclaration.fir.kt
@@ -8,9 +8,9 @@
 
 expect class B {}
 
-<!EXPECT_ACTUAL_INCOMPATIBILITY{JVM}!>expect class C {
-    <!NO_ACTUAL_FOR_EXPECT{JVM}!>class N<!>
-}<!>
+expect class C {
+    class N
+}
 
 expect abstract class D()
 
diff --git a/compiler/testData/diagnostics/tests/multiplatform/scopes/nestedClassesRedeclaration.ll.kt b/compiler/testData/diagnostics/tests/multiplatform/scopes/nestedClassesRedeclaration.ll.kt
deleted file mode 100644
index e2462fd..0000000
--- a/compiler/testData/diagnostics/tests/multiplatform/scopes/nestedClassesRedeclaration.ll.kt
+++ /dev/null
@@ -1,42 +0,0 @@
-// LANGUAGE: +MultiPlatformProjects
-
-// MODULE: common
-// FILE: common.kt
-expect class A {
-    class N
-}
-
-expect class B {}
-
-expect class C {
-    class N
-}
-
-expect abstract class D()
-
-class E : D() {
-    class N
-}
-
-// MODULE: jvm()()(common)
-// FILE: main.kt
-abstract class P() {
-    class N
-}
-
-actual class A : P() {
-    actual class N
-}
-
-actual class B : P() {
-    class N
-}
-
-actual class C {
-    actual class <!REDECLARATION!>N<!>
-    class <!ACTUAL_MISSING, REDECLARATION!>N<!>
-}
-
-actual abstract class D {
-    class N
-}
diff --git a/compiler/testData/diagnostics/tests/multiplatform/scopes/propertyRedeclaration.fir.kt b/compiler/testData/diagnostics/tests/multiplatform/scopes/propertyRedeclaration.fir.kt
index e62397b..a67b3c3 100644
--- a/compiler/testData/diagnostics/tests/multiplatform/scopes/propertyRedeclaration.fir.kt
+++ b/compiler/testData/diagnostics/tests/multiplatform/scopes/propertyRedeclaration.fir.kt
@@ -10,9 +10,9 @@
 
 expect class C : B
 
-<!EXPECT_ACTUAL_INCOMPATIBILITY{JVM}!>expect abstract class D() {
-    <!AMBIGUOUS_ACTUALS{JVM}, NO_ACTUAL_FOR_EXPECT{JVM}!>val x: Int<!>
-}<!>
+expect abstract class D() {
+    <!AMBIGUOUS_ACTUALS{JVM}!>val x: Int<!>
+}
 
 class E : D()
 
@@ -32,7 +32,7 @@
 
 actual class C : B(), I {}
 
-actual abstract class <!NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS!>D<!> {
+actual abstract class D {
     actual val <!REDECLARATION!>x<!> = 0
     val <!ACTUAL_MISSING, REDECLARATION!>x<!> = 0
 }
diff --git a/compiler/testData/diagnostics/tests/multiplatform/scopes/propertyRedeclaration.ll.kt b/compiler/testData/diagnostics/tests/multiplatform/scopes/propertyRedeclaration.ll.kt
index 753fa3d..ddd0cf8 100644
--- a/compiler/testData/diagnostics/tests/multiplatform/scopes/propertyRedeclaration.ll.kt
+++ b/compiler/testData/diagnostics/tests/multiplatform/scopes/propertyRedeclaration.ll.kt
@@ -32,7 +32,7 @@
 
 actual class C : B(), I {}
 
-actual abstract class <!NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS!>D<!> {
+actual abstract class D {
     actual val <!REDECLARATION!>x<!> = 0
     val <!ACTUAL_MISSING, REDECLARATION!>x<!> = 0
 }
diff --git a/compiler/testData/diagnostics/tests/multiplatform/topLevelFun/conflictingImplDeclarations.fir.kt b/compiler/testData/diagnostics/tests/multiplatform/topLevelFun/conflictingImplDeclarations.fir.kt
index 34b85eb..2113440 100644
--- a/compiler/testData/diagnostics/tests/multiplatform/topLevelFun/conflictingImplDeclarations.fir.kt
+++ b/compiler/testData/diagnostics/tests/multiplatform/topLevelFun/conflictingImplDeclarations.fir.kt
@@ -1,7 +1,7 @@
 // MODULE: m1-common
 // FILE: common.kt
 
-<!AMBIGUOUS_ACTUALS{JVM}, AMBIGUOUS_ACTUALS{JS}, NO_ACTUAL_FOR_EXPECT{JVM}, NO_ACTUAL_FOR_EXPECT{JS}!>expect fun foo()<!>
+<!AMBIGUOUS_ACTUALS{JVM}, AMBIGUOUS_ACTUALS{JS}!>expect fun foo()<!>
 
 // MODULE: m2-jvm()()(m1-common)
 // FILE: jvm.kt
diff --git a/compiler/testData/diagnostics/tests/multiplatform/topLevelProperty/redeclarationBasicCases.fir.kt b/compiler/testData/diagnostics/tests/multiplatform/topLevelProperty/redeclarationBasicCases.fir.kt
index d0dcb10..a0715fe 100644
--- a/compiler/testData/diagnostics/tests/multiplatform/topLevelProperty/redeclarationBasicCases.fir.kt
+++ b/compiler/testData/diagnostics/tests/multiplatform/topLevelProperty/redeclarationBasicCases.fir.kt
@@ -8,7 +8,7 @@
 expect val <!EXPECT_AND_ACTUAL_IN_THE_SAME_MODULE, EXPECT_AND_ACTUAL_IN_THE_SAME_MODULE{METADATA}!>x2<!>: Int
 val <!EXPECT_AND_ACTUAL_IN_THE_SAME_MODULE{METADATA}, REDECLARATION!>x2<!> = 2
 
-<!AMBIGUOUS_ACTUALS{JVM}, NO_ACTUAL_FOR_EXPECT{JVM}!>expect val x3: Int<!>
+<!AMBIGUOUS_ACTUALS{JVM}!>expect val x3: Int<!>
 
 // MODULE: jvm()()(common)
 // FILE: main.kt
diff --git a/compiler/testData/diagnostics/tests/multiplatform/topLevelProperty/redeclarationBasicCasesHMPP.fir.kt b/compiler/testData/diagnostics/tests/multiplatform/topLevelProperty/redeclarationBasicCasesHMPP.fir.kt
index 8c21483..0e1c184 100644
--- a/compiler/testData/diagnostics/tests/multiplatform/topLevelProperty/redeclarationBasicCasesHMPP.fir.kt
+++ b/compiler/testData/diagnostics/tests/multiplatform/topLevelProperty/redeclarationBasicCasesHMPP.fir.kt
@@ -4,9 +4,9 @@
 // TARGET_PLATFORM: Common
 expect val <!REDECLARATION!>x1<!>: Int
 
-<!AMBIGUOUS_ACTUALS{JVM}, NO_ACTUAL_FOR_EXPECT{JVM}!>expect val x2: Int<!>
+<!AMBIGUOUS_ACTUALS{JVM}!>expect val x2: Int<!>
 
-<!AMBIGUOUS_ACTUALS{JVM}, NO_ACTUAL_FOR_EXPECT{JVM}!>expect val x3: Int<!>
+<!AMBIGUOUS_ACTUALS{JVM}!>expect val x3: Int<!>
 
 // MODULE: intermediate()()(common)
 // TARGET_PLATFORM: Common
diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java
index 82249b4..c7d569b 100644
--- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java
+++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java
@@ -25237,6 +25237,12 @@
       }
 
       @Test
+      @TestMetadata("ambiguousActualsJavaPrimitiveIntTypeVsIntegerObject.kt")
+      public void testAmbiguousActualsJavaPrimitiveIntTypeVsIntegerObject() {
+        runTest("compiler/testData/diagnostics/tests/multiplatform/ambiguousActualsJavaPrimitiveIntTypeVsIntegerObject.kt");
+      }
+
+      @Test
       @TestMetadata("annotationArgArrayVsOutArray.kt")
       public void testAnnotationArgArrayVsOutArray() {
         runTest("compiler/testData/diagnostics/tests/multiplatform/annotationArgArrayVsOutArray.kt");