Redundant companion reference: Fix false positive in enum entry #KT-27861 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
d88fd8aa6f
commit
7a9effe30d
@@ -0,0 +1,13 @@
|
||||
enum class E {
|
||||
E1;
|
||||
|
||||
fun test() {
|
||||
bar(<caret>Companion.foo)
|
||||
}
|
||||
|
||||
fun bar(s: String) {}
|
||||
|
||||
companion object {
|
||||
const val foo = ""
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
enum class E {
|
||||
E1;
|
||||
|
||||
fun test() {
|
||||
bar(foo)
|
||||
}
|
||||
|
||||
fun bar(s: String) {}
|
||||
|
||||
companion object {
|
||||
const val foo = ""
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// PROBLEM: none
|
||||
// DISABLE-ERRORS
|
||||
|
||||
enum class E(val value: String) {
|
||||
E1(<caret>Companion.foo);
|
||||
|
||||
companion object {
|
||||
const val foo = ""
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
enum class E(val value: String) {
|
||||
E1(A.<caret>Companion.foo);
|
||||
}
|
||||
|
||||
class A {
|
||||
companion object {
|
||||
const val foo = ""
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
enum class E(val value: String) {
|
||||
E1(A.foo);
|
||||
}
|
||||
|
||||
class A {
|
||||
companion object {
|
||||
const val foo = ""
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user