Files
kotlin-fork/compiler/testData/diagnostics/tests/namedArguments/disallowForSamAdapterFunction.kt
T
Stanislav Erokhin 8f0b073c08 [NI] Prototype for SAM-conversion.
Supported:
- conversion in resolution parts. Also sam-with-receiver is supported automatically
- separate flag for kotlin function with java SAM as parameters

TODO:
- fix overload conflict error when function type is the same byte origin types is ordered
- consider case when parameter type is T, T <:> Runnable
- support vararg of Runnable

[NI] Turn off synthetic scope with SAM adapter functions if NI enabled
2018-06-04 12:21:56 +03:00

18 lines
298 B
Kotlin
Vendored

// !WITH_NEW_INFERENCE
// FILE: test/J.java
package test;
public class J {
public static void foo(String s, Runnable r, Boolean z) {
}
}
// FILE: usage.kt
package test
fun test() {
J.foo("", <!NAMED_ARGUMENTS_NOT_ALLOWED!>r<!> = { }, <!NAMED_ARGUMENTS_NOT_ALLOWED!>z<!> = false)
}