Files
kotlin-fork/compiler/testData/diagnostics/tests/FreeFunctionCalledAsExtension.kt
T
Alexander Udalov 7449ad2763 Rename Extension annotation to ExtensionFunctionType
The old one is kept temporarily and will be removed later
2015-12-21 20:33:32 +03:00

14 lines
399 B
Kotlin
Vendored

fun foo(<!UNUSED_PARAMETER!>a<!>: (String) -> Unit) {
"".<!UNRESOLVED_REFERENCE!>a<!>()
}
interface A : (String) -> Unit {}
fun foo(<!UNUSED_PARAMETER!>a<!>: @ExtensionFunctionType A) {
// @Extension annotation on an unrelated type shouldn't have any effect on this diagnostic.
// Only kotlin.Function{n} type annotated with @Extension should
"".<!UNRESOLVED_REFERENCE!>a<!>()
}