Files
kotlin-fork/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunction.fir.kt
T
Dmitriy Novozhilov f283f2db43 [FIR] Improve diagnostic reporting & don't use error symbol for candidate if possible
Also introduce few new diagnostics:
- NONE_APPLICABLE more many inapplicable candidates
- HIDDEN for visible candidates
2020-07-28 20:46:56 +03:00

21 lines
470 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_PARAMETER
// !CHECK_TYPE
// FILE: Foo.java
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
public class Foo {
interface FObject {
void invoke(Object i);
}
public String test(FObject f) { return ""; }
public int test(Function1<Integer, Unit> f) { return 1; }
}
// FILE: 1.kt
fun bar() {
Foo().<!AMBIGUITY!>test<!> {} <!INAPPLICABLE_CANDIDATE!>checkType<!> { <!INAPPLICABLE_CANDIDATE!>_<!><String>() }
}