Files
kotlin-fork/compiler/testData/diagnostics/tests/namedArguments/disallowForSamAdapterFunction.kt
T
Alexander Udalov c0fc5cfb53 Disallow named arguments for SAM adapters
SAM adapters are Java functions, and named arguments are not allowed for Java
functions

 #KT-5022 Fixed
2014-07-02 20:35:31 +04:00

17 lines
275 B
Kotlin

// 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)
}