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 {})
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package
|
||||
|
||||
public fun foo(/*0*/ f: KRunnable): kotlin.Unit
|
||||
public fun test(): kotlin.Unit
|
||||
|
||||
public interface KRunnable {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public abstract fun invoke(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
public typealias KRunnableAlias = KRunnable
|
||||
Reference in New Issue
Block a user