-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Redundant qualifier name: don't report for EnumClass.Companion
#KT-37181 Fixed
- Loading branch information
1 parent
f747f85
commit 831fbba
Showing
5 changed files
with
77 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
idea/testData/inspectionsLocal/removeRedundantQualifierName/notApplicableEnumCompanion.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// PROBLEM: none | ||
package foo.bar | ||
|
||
import foo.bar.MyEnum.* | ||
|
||
enum class MyEnum(val id: Int) { | ||
A(1), | ||
B(2); | ||
|
||
companion object { | ||
fun baz() = "" | ||
} | ||
} | ||
|
||
fun test() { | ||
<caret>MyEnum.Companion::baz | ||
} |
17 changes: 17 additions & 0 deletions
17
idea/testData/inspectionsLocal/removeRedundantQualifierName/notApplicableEnumCompanion2.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// PROBLEM: none | ||
package foo.bar | ||
|
||
import foo.bar.MyEnum.* | ||
|
||
enum class MyEnum(val id: Int) { | ||
A(1), | ||
B(2); | ||
|
||
companion object O { | ||
fun baz() = "" | ||
} | ||
} | ||
|
||
fun test() { | ||
<caret>MyEnum.O::baz | ||
} |
17 changes: 17 additions & 0 deletions
17
idea/testData/inspectionsLocal/removeRedundantQualifierName/notApplicableEnumCompanion3.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// PROBLEM: none | ||
package foo.bar | ||
|
||
import foo.bar.MyEnum.* | ||
|
||
enum class MyEnum(val id: Int) { | ||
A(1), | ||
B(2); | ||
|
||
companion object { | ||
fun baz() = "" | ||
} | ||
} | ||
|
||
fun test() { | ||
<caret>MyEnum.Companion.baz() | ||
} |
15 changes: 15 additions & 0 deletions
15
idea/tests/org/jetbrains/kotlin/idea/inspections/LocalInspectionTestGenerated.java
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.