K2: Add test for obsolete KT-55705

It was likely fixed together with KT-55722

^KT-55705 Obsolete
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 4103c43..a988a5c 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
@@ -27832,6 +27832,12 @@
                 }
 
                 @Test
+                @TestMetadata("kt55705.kt")
+                public void testKt55705() throws Exception {
+                    runTest("compiler/testData/diagnostics/tests/resolve/overloadConflicts/kt55705.kt");
+                }
+
+                @Test
                 @TestMetadata("kt55722.kt")
                 public void testKt55722() throws Exception {
                     runTest("compiler/testData/diagnostics/tests/resolve/overloadConflicts/kt55722.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 a5f03aa..8a84792 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
@@ -27832,6 +27832,12 @@
                 }
 
                 @Test
+                @TestMetadata("kt55705.kt")
+                public void testKt55705() throws Exception {
+                    runTest("compiler/testData/diagnostics/tests/resolve/overloadConflicts/kt55705.kt");
+                }
+
+                @Test
                 @TestMetadata("kt55722.kt")
                 public void testKt55722() throws Exception {
                     runTest("compiler/testData/diagnostics/tests/resolve/overloadConflicts/kt55722.kt");
diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeOldFrontendDiagnosticsTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeOldFrontendDiagnosticsTestGenerated.java
index fd08838..6b35227 100644
--- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeOldFrontendDiagnosticsTestGenerated.java
+++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeOldFrontendDiagnosticsTestGenerated.java
@@ -27832,6 +27832,12 @@
                 }
 
                 @Test
+                @TestMetadata("kt55705.kt")
+                public void testKt55705() throws Exception {
+                    runTest("compiler/testData/diagnostics/tests/resolve/overloadConflicts/kt55705.kt");
+                }
+
+                @Test
                 @TestMetadata("kt55722.kt")
                 public void testKt55722() throws Exception {
                     runTest("compiler/testData/diagnostics/tests/resolve/overloadConflicts/kt55722.kt");
diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirPsiOldFrontendDiagnosticsTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirPsiOldFrontendDiagnosticsTestGenerated.java
index abc6d95..28b79db 100644
--- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirPsiOldFrontendDiagnosticsTestGenerated.java
+++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirPsiOldFrontendDiagnosticsTestGenerated.java
@@ -27844,6 +27844,12 @@
                 }
 
                 @Test
+                @TestMetadata("kt55705.kt")
+                public void testKt55705() throws Exception {
+                    runTest("compiler/testData/diagnostics/tests/resolve/overloadConflicts/kt55705.kt");
+                }
+
+                @Test
                 @TestMetadata("kt55722.kt")
                 public void testKt55722() throws Exception {
                     runTest("compiler/testData/diagnostics/tests/resolve/overloadConflicts/kt55722.kt");
diff --git a/compiler/testData/diagnostics/tests/resolve/overloadConflicts/kt55705.fir.txt b/compiler/testData/diagnostics/tests/resolve/overloadConflicts/kt55705.fir.txt
new file mode 100644
index 0000000..1092ade
--- /dev/null
+++ b/compiler/testData/diagnostics/tests/resolve/overloadConflicts/kt55705.fir.txt
@@ -0,0 +1,18 @@
+FILE: kt55705.kt
+    public abstract interface A<T> : R|kotlin/Any| {
+        public open fun foo(x: R|T?|): R|kotlin/Unit| {
+        }
+
+    }
+    public abstract interface B : R|A<kotlin/String>| {
+        public abstract override fun foo(x: R|kotlin/String?|): R|kotlin/Unit|
+
+    }
+    public final fun <T> bar(x: R|A<in T>|): R|kotlin/Unit| {
+        when () {
+            (R|<local>/x| is R|B|) ->  {
+                R|<local>/x|.R|/B.foo|(Null(null))
+            }
+        }
+
+    }
diff --git a/compiler/testData/diagnostics/tests/resolve/overloadConflicts/kt55705.kt b/compiler/testData/diagnostics/tests/resolve/overloadConflicts/kt55705.kt
new file mode 100644
index 0000000..2523309
--- /dev/null
+++ b/compiler/testData/diagnostics/tests/resolve/overloadConflicts/kt55705.kt
@@ -0,0 +1,17 @@
+// FIR_IDENTICAL
+// ISSUE: KT-55705
+// FIR_DUMP
+
+interface A<T> {
+    fun foo(x: T?) {}
+}
+
+interface B : A<String> {
+    override fun foo(x: String?)
+}
+
+fun <T> bar(x: A<in T>) {
+    if (x is B) {
+        x.foo(null) // Should be no OVERLOAD_RESOLUTION_AMBIGUITY
+    }
+}
\ No newline at end of file
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 39741b4..81a80d0 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
@@ -28676,6 +28676,12 @@
                 }
 
                 @Test
+                @TestMetadata("kt55705.kt")
+                public void testKt55705() throws Exception {
+                    runTest("compiler/testData/diagnostics/tests/resolve/overloadConflicts/kt55705.kt");
+                }
+
+                @Test
                 @TestMetadata("kt55722.kt")
                 public void testKt55722() throws Exception {
                     runTest("compiler/testData/diagnostics/tests/resolve/overloadConflicts/kt55722.kt");