Move: Fix warning on companion used as implicit dispatch receiver
Do not report conflict if target class is a sublcass of companion object's containing class
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
package test
|
||||
|
||||
open class A {
|
||||
companion object {
|
||||
fun Int.extFoo(n: Int) {}
|
||||
|
||||
val Int.extBar: Int get() = 1
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class C : A() {
|
||||
class B {
|
||||
fun test() {
|
||||
1.extFoo(1.extBar)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package test
|
||||
|
||||
open class A {
|
||||
companion object {
|
||||
fun Int.extFoo(n: Int) {}
|
||||
|
||||
val Int.extBar: Int get() = 1
|
||||
}
|
||||
|
||||
class <caret>B {
|
||||
fun test() {
|
||||
1.extFoo(1.extBar)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class C : A() {
|
||||
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"mainFile": "test.kt",
|
||||
"type": "MOVE_KOTLIN_NESTED_CLASS",
|
||||
"targetClass": "test.C",
|
||||
"withRuntime": "true"
|
||||
}
|
||||
Reference in New Issue
Block a user