FIR IDE: Check function call before trying to drop the receiver

This commit is contained in:
Roman Golyshev
2020-12-30 13:58:23 +03:00
committed by Space
parent d88fd5bd73
commit 51c59e5634
10 changed files with 123 additions and 3 deletions
@@ -0,0 +1,12 @@
// FIR_COMPARISON
package test
import test.Obj.funFromObj
object Obj {
fun funFromObj() {}
}
fun usage() {
<selection>Obj.funFromObj()</selection>
}
@@ -0,0 +1,12 @@
// FIR_COMPARISON
package test
import test.Obj.funFromObj
object Obj {
fun funFromObj() {}
}
fun usage() {
funFromObj()
}
@@ -0,0 +1,12 @@
// FIR_COMPARISON
package test
class T {
companion object
}
fun T.Companion.ext() {}
fun usage() {
<selection>T.ext()</selection>
}
@@ -0,0 +1,12 @@
// FIR_COMPARISON
package test
class T {
companion object
}
fun T.Companion.ext() {}
fun usage() {
T.ext()
}
@@ -0,0 +1,10 @@
// FIR_COMPARISON
package test
object T
fun T.ext() {}
fun usage() {
<selection>T.ext()</selection>
}
@@ -0,0 +1,10 @@
// FIR_COMPARISON
package test
object T
fun T.ext() {}
fun usage() {
T.ext()
}
@@ -0,0 +1,10 @@
// FIR_COMPARISON
package test
class T
fun T.ext() {}
fun usage(t: T) {
<selection>t.ext()</selection>
}
@@ -0,0 +1,10 @@
// FIR_COMPARISON
package test
class T
fun T.ext() {}
fun usage(t: T) {
t.ext()
}