Add test for KT-27565
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
// !LANGUAGE: +NewInference +SamConversionForKotlinFunctions
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// ISSUE: KT-27565
|
||||
|
||||
// FILE: Runnable.java
|
||||
|
||||
public interface Runnable {
|
||||
void run();
|
||||
}
|
||||
|
||||
// FILE: k.kt
|
||||
|
||||
fun fail() {
|
||||
<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!>({ }, { })
|
||||
}
|
||||
|
||||
fun foo(f: Runnable, selector: () -> Unit) {}
|
||||
fun foo(func1: () -> Unit, func2: () -> Unit) {}
|
||||
@@ -0,0 +1,12 @@
|
||||
package
|
||||
|
||||
public fun fail(): kotlin.Unit
|
||||
public fun foo(/*0*/ func1: () -> kotlin.Unit, /*1*/ func2: () -> kotlin.Unit): kotlin.Unit
|
||||
public fun foo(/*0*/ f: Runnable, /*1*/ selector: () -> kotlin.Unit): kotlin.Unit
|
||||
|
||||
public interface Runnable {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public abstract fun run(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
@@ -15396,6 +15396,11 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/kotlinCollectionToJava.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt27565.kt")
|
||||
public void testKt27565() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/kt27565.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("list.kt")
|
||||
public void testList() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/list.kt");
|
||||
|
||||
Generated
+5
@@ -15391,6 +15391,11 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
|
||||
runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/kotlinCollectionToJava.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt27565.kt")
|
||||
public void testKt27565() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/kt27565.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("list.kt")
|
||||
public void testList() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/list.kt");
|
||||
|
||||
Reference in New Issue
Block a user