Report error when free function is called as extension
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
fun foo(a: (String) -> Unit) {
|
||||
"".<!FREE_FUNCTION_CALLED_AS_EXTENSION!>a<!>()
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package
|
||||
|
||||
internal fun foo(/*0*/ a: (kotlin.String) -> kotlin.Unit): kotlin.Unit
|
||||
+2
-2
@@ -5,7 +5,7 @@ fun test1(f: String.() -> Unit) {
|
||||
}
|
||||
|
||||
fun test2(f: (Int) -> Int) {
|
||||
1.f(<!TOO_MANY_ARGUMENTS!>2<!>)
|
||||
1.<!FREE_FUNCTION_CALLED_AS_EXTENSION!>f<!>(<!TOO_MANY_ARGUMENTS!>2<!>)
|
||||
|
||||
2.(f)(<!TOO_MANY_ARGUMENTS!>2<!>)
|
||||
2.<!FREE_FUNCTION_CALLED_AS_EXTENSION!>(f)<!>(<!TOO_MANY_ARGUMENTS!>2<!>)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user