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:
+9
@@ -0,0 +1,9 @@
|
||||
class C {
|
||||
companion object {
|
||||
fun plus(s: String): C = C()
|
||||
}
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
C.<caret>plus("x")
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
class C {
|
||||
companion object {
|
||||
fun plus(s: String): C = C()
|
||||
}
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
C + "x"
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// IS_APPLICABLE: false
|
||||
|
||||
open class Base {
|
||||
open fun plus(s: String) = ""
|
||||
}
|
||||
|
||||
class C : Base() {
|
||||
override fun plus(s: String): String {
|
||||
return super.<caret>plus(s)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user