Added test for ambiguous SAM adapters within one class.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
// FILE: A.java
|
||||
import java.io.Closeable;
|
||||
|
||||
public class A {
|
||||
public static void foo(Runnable r) {
|
||||
}
|
||||
|
||||
public static void foo(Closeable c) {
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
|
||||
fun main() {
|
||||
A.<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo { "Hello!" }<!>
|
||||
A.foo(Runnable { "Hello!" })
|
||||
}
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package test;
|
||||
|
||||
import java.io.Closeable;
|
||||
|
||||
public class AmbiguousAdapters {
|
||||
public void foo(Runnable r) {
|
||||
}
|
||||
|
||||
public void foo(Closeable c) {
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
public open class AmbiguousAdapters : java.lang.Object {
|
||||
public constructor AmbiguousAdapters()
|
||||
public open /*synthesized*/ fun foo(/*0*/ p0: (() -> jet.Unit)?): jet.Unit
|
||||
public open /*synthesized*/ fun foo(/*0*/ p0: (() -> jet.Unit)?): jet.Unit
|
||||
public open fun foo(/*0*/ p0: java.io.Closeable?): jet.Unit
|
||||
public open fun foo(/*0*/ p0: java.lang.Runnable?): jet.Unit
|
||||
}
|
||||
Reference in New Issue
Block a user