[FIR] Fix NO_RECEIVER_ALLOWED

If we do create an implicit invoke call, and
then put the receiver into the argument list,
we should mark it.
This commit is contained in:
Nikolay Lunyak
2024-01-22 12:34:39 +02:00
committed by Space Team
parent eb11901d43
commit 9b786d35f8
12 changed files with 38 additions and 9 deletions
@@ -30,5 +30,5 @@ fun rain() {
5.(<!UNRESOLVED_REFERENCE!>::<!UNRESOLVED_REFERENCE!>x<!><!>)().inv()
5.(Int::x)().inv()
<!NO_RECEIVER_ALLOWED!>5.(Int::x)()<!>.inv()
}
@@ -1,5 +1,5 @@
// ISSUE: KT-64891
fun test(f: (Int) -> Int) {
2.(f)()
<!NO_RECEIVER_ALLOWED!>2.(f)()<!>
}
@@ -7,5 +7,5 @@ fun test1(f: String.() -> Unit) {
fun test2(f: (Int) -> Int) {
1.<!UNRESOLVED_REFERENCE!>f<!>(2)
2.(f)(<!TOO_MANY_ARGUMENTS!>2<!>)
<!NO_RECEIVER_ALLOWED!>2.(f)(<!TOO_MANY_ARGUMENTS!>2<!>)<!>
}