"Receiver parameter is never used" inspection: don't report it when anonymous function is called with receiver

#KT-41246 Fixed
This commit is contained in:
Toshiaki Kameyama
2020-10-02 11:07:25 +09:00
committed by Dmitry Gridin
parent 112e07814e
commit bcbb90dd81
8 changed files with 67 additions and 2 deletions
@@ -0,0 +1,6 @@
class A {
fun a() {
val f = fun <caret>A.() {
}
}
}
@@ -0,0 +1,6 @@
class A {
fun a() {
val f = fun() {
}
}
}
@@ -0,0 +1,6 @@
class A {
fun a() {
(fun <caret>A.() {
})()
}
}
@@ -0,0 +1,6 @@
class A {
fun a() {
(fun() {
})()
}
}
@@ -0,0 +1,7 @@
// PROBLEM: none
class A {
fun a() {
this.(fun <caret>A.() {
})()
}
}
@@ -0,0 +1,7 @@
// PROBLEM: none
class A
fun test(a: A) {
a.(fun <caret>A.() {
})()
}