Forbidden old invokeExtension convention.
This commit is contained in:
@@ -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<!>()
|
||||
}
|
||||
Reference in New Issue
Block a user