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!" })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user