891a036b59
After this change SAM adapters are being resolved in the same group as members, thus their overload resolution happens simultaneously. But in the case of overload resolution ambiguity try to filter out all synthetic members and run the process again. See the issue and new test for clarification #KT-11128 In Progress
17 lines
462 B
Kotlin
Vendored
17 lines
462 B
Kotlin
Vendored
// FILE: KotlinFile.kt
|
|
fun foo(javaClass: JavaClass<Int>): Int {
|
|
val inner = javaClass.createInner<String>()
|
|
return <!TYPE_MISMATCH!>inner.doSomething(<!CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>, "") <!TYPE_MISMATCH!>{ }<!><!>
|
|
}
|
|
|
|
// FILE: JavaClass.java
|
|
public class JavaClass<T> {
|
|
public <X> Inner<X> createInner() {
|
|
return new Inner<X>();
|
|
}
|
|
|
|
public interface Inner<X>{
|
|
public T doSomething(T t, X x, Runnable runnable);
|
|
}
|
|
}
|