Files
kotlin-fork/compiler/testData/diagnostics/tests/funInterface/funInterfaceSyntheticConstructors.kt
T

17 lines
331 B
Kotlin
Vendored

// FIR_IDENTICAL
// !LANGUAGE: +SamConversionForKotlinFunctions +SamConversionPerArgument +FunctionalInterfaceConversion
// !DIAGNOSTICS: -UNUSED_PARAMETER
fun interface KRunnable {
fun invoke()
}
typealias KRunnableAlias = KRunnable
fun foo(f: KRunnable) {}
fun test() {
foo(KRunnable {})
foo(KRunnableAlias {})
}