21 lines
440 B
Kotlin
Vendored
21 lines
440 B
Kotlin
Vendored
// !LANGUAGE: +NewInference +FunctionReferenceWithDefaultValueAsOtherType +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
|
|
|
fun interface IFoo {
|
|
fun foo(i: Int)
|
|
}
|
|
|
|
fun useVararg(vararg foos: IFoo) {}
|
|
|
|
fun testLambda() {
|
|
useVararg({})
|
|
}
|
|
|
|
fun testSeveralLambdas() {
|
|
useVararg({}, {}, {})
|
|
}
|
|
|
|
fun withVarargOfInt(vararg xs: Int) = ""
|
|
|
|
fun testAdaptedCR() {
|
|
useVararg(::withVarargOfInt)
|
|
} |