FIC: Add synthetic constructors for fun interfaces aka explicit FIC
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
// !LANGUAGE: +NewInference +SamConversionForKotlinFunctions +SamConversionPerArgument +FunctionInterfaceConversion
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
fun interface KRunnable {
|
||||
fun invoke()
|
||||
}
|
||||
|
||||
typealias KRunnableAlias = KRunnable
|
||||
|
||||
fun foo(f: KRunnable) {}
|
||||
|
||||
fun test() {
|
||||
foo(KRunnable {})
|
||||
foo(KRunnableAlias {})
|
||||
}
|
||||
Reference in New Issue
Block a user