Prohibit functional interface constructor references

#KT-36706 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2020-06-26 08:08:18 +03:00
parent e3050cd997
commit bc40669598
10 changed files with 69 additions and 1 deletions
@@ -0,0 +1,7 @@
fun interface Foo {
fun run()
}
val x = ::Foo
val y = Foo { }
val z = ::Runnable
@@ -0,0 +1,7 @@
fun interface Foo {
fun run()
}
val x = ::<!FUN_INTERFACE_CONSTRUCTOR_REFERENCE!>Foo<!>
val y = Foo { }
val z = ::Runnable
@@ -0,0 +1,12 @@
package
public val x: kotlin.reflect.KFunction1<() -> kotlin.Unit, Foo>
public val y: Foo
public val z: kotlin.reflect.KFunction1<() -> kotlin.Unit, java.lang.Runnable>
public fun 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 run(): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}