Files
kotlin-fork/compiler/testData/diagnostics/tests/funInterface/funInterfaceSyntheticConstructors.kt
T
2020-01-17 19:37:47 +03:00

15 lines
327 B
Kotlin
Vendored

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