mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-18 15:54:05 +00:00
Because of incorrect flag we generated synthetic SAM candidates and got ambiguity when feature `SamConversionPerArgument` was enabled (Gradle case) because candidates for Java were duplicated #KT-35579 Fixed
26 lines
556 B
Kotlin
Vendored
26 lines
556 B
Kotlin
Vendored
// !LANGUAGE: +NewInference +SamConversionForKotlinFunctions +SamConversionPerArgument
|
|
// !DIAGNOSTICS: -UNUSED_PARAMETER,-UNUSED_VARIABLE
|
|
|
|
// FILE: Action.java
|
|
public interface Action<T> {
|
|
void execute(T t);
|
|
}
|
|
|
|
// FILE: Other.java
|
|
|
|
// It's important that this is Java
|
|
public interface Other {
|
|
void pluginManagement(Action<? super Number> pluginManagementSpec);
|
|
}
|
|
|
|
// FILE: test.kt
|
|
interface B {
|
|
fun pluginManagement(block: Number.() -> Unit): Unit {}
|
|
}
|
|
|
|
interface C : B, Other
|
|
|
|
fun test(c: C) {
|
|
c.<!AMBIGUITY!>pluginManagement<!> {
|
|
}
|
|
} |