1fd0dec5e7
Allow callable references to Kotlin 'fun interface' constructors. Prohibit callable references to Java SAM interface constructors.
11 lines
256 B
Kotlin
Vendored
11 lines
256 B
Kotlin
Vendored
// FIR_IDENTICAL
|
|
// !LANGUAGE: +AllowKotlinFunInterfaceConstructorReference +ProhibitJavaSamInterfaceConstructorReference
|
|
|
|
fun interface Foo {
|
|
fun run()
|
|
}
|
|
|
|
val x = ::Foo
|
|
val y = Foo { }
|
|
val z = ::<!JAVA_SAM_INTERFACE_CONSTRUCTOR_REFERENCE!>Runnable<!>
|