Files
kotlin-fork/compiler/testData/diagnostics/tests/FreeFunctionCalledAsExtension.kt
T
Dmitrii Gridin 9a4a3d1f49 [LL FIR] introduce test with reversed resolve order
^KT-56543

Merge-request: KT-MR-9299
Merged-by: Dmitrii Gridin <dmitry.gridin@jetbrains.com>
2023-03-22 17:34:07 +00:00

16 lines
450 B
Kotlin
Vendored

// IGNORE_REVERSED_RESOLVE
fun foo(a: (String) -> Unit) {
"".<!UNRESOLVED_REFERENCE!>a<!>()
}
interface A : (String) -> Unit {}
typealias AliasedEFT = ExtensionFunctionType
fun foo(a: <!WRONG_EXTENSION_FUNCTION_TYPE!>@AliasedEFT<!> 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<!>()
}