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

16 lines
328 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 {})
}