Do not report "unused receiver" on companion objects

So #KT-19560 Fixed
This commit is contained in:
Mikhail Glukhikh
2017-10-23 19:13:46 +03:00
parent 84ab397f25
commit 6c2eb06351
5 changed files with 45 additions and 0 deletions
@@ -0,0 +1,13 @@
// PROBLEM: none
class Test {
companion object {
}
}
fun <caret>Test.Companion.foo() = 42
fun main(args: Array<String>) {
Test.foo()
}
@@ -0,0 +1,8 @@
object Test
fun <caret>Test.foo() = 42
fun main(args: Array<String>) {
val x = Test
x.foo()
}
@@ -0,0 +1,8 @@
object Test
fun foo() = 42
fun main(args: Array<String>) {
val x = Test
foo()
}