Forbidden old invokeExtension convention.

This commit is contained in:
Stanislav Erokhin
2015-10-16 21:25:25 +03:00
parent fc4b0a8121
commit 7d7d37719b
26 changed files with 157 additions and 126 deletions
@@ -1,5 +1,5 @@
fun foo(a: (String) -> Unit) {
"".<!FREE_FUNCTION_CALLED_AS_EXTENSION!>a<!>()
"".<!INVOKE_EXTENSION_ON_NOT_EXTENSION_FUNCTION!>a<!>()
}
@@ -9,5 +9,5 @@ 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<!>()
}
"".<!INVOKE_EXTENSION_ON_NOT_EXTENSION_FUNCTION!>a<!>()
}