Files
kotlin-fork/compiler/testData/diagnostics/tests/FreeFunctionCalledAsExtension.kt
T
2015-09-04 17:23:25 +03:00

14 lines
367 B
Kotlin
Vendored

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