KT-7525 Don't suggest to replace 'get' call with index operator for static method calls (inspection & intention)
KT-5322 super.get issues a "Replace 'get' call with index operator" inspection #KT-7525 Fixed #KT-5322 Fixed
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
class C {
|
||||
companion object {
|
||||
fun minus(): C = C()
|
||||
}
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
C.<caret>minus()
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
class C {
|
||||
companion object {
|
||||
fun minus(): C = C()
|
||||
}
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
-C
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// IS_APPLICABLE: false
|
||||
|
||||
open class Base {
|
||||
open fun minus() = this
|
||||
}
|
||||
|
||||
class C : Base() {
|
||||
override fun minus(): Base {
|
||||
return super.<caret>minus()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user