Files
kotlin-fork/compiler/testData/ir/irText/expressions/funInterface/samConversionInVarargs.kt
T
2020-01-30 10:27:01 +03:00

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