FIC: introduce language feature, modifiers checks and basic tests
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
// !LANGUAGE: +FunctionInterfaceConversion
|
||||
|
||||
fun interface Foo {
|
||||
fun invoke(): String
|
||||
}
|
||||
|
||||
class A : Foo {
|
||||
override fun invoke(): String {
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return A().invoke()
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// !LANGUAGE: +FunctionInterfaceConversion
|
||||
|
||||
fun interface Foo {
|
||||
fun invoke()
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package
|
||||
|
||||
public interface Foo {
|
||||
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
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// !LANGUAGE: -FunctionInterfaceConversion
|
||||
|
||||
<!UNSUPPORTED_FEATURE!>fun<!> interface Foo {
|
||||
fun invoke()
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package
|
||||
|
||||
public interface Foo {
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user