Never report companion object as unused
#KT-11366 Fixed
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
class Logger {
|
||||
fun log(){}
|
||||
}
|
||||
|
||||
abstract class WithLogging {
|
||||
val logger = Logger()
|
||||
}
|
||||
|
||||
class C {
|
||||
companion object: WithLogging()
|
||||
|
||||
fun foo() {
|
||||
logger.log()
|
||||
}
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
C()
|
||||
}
|
||||
@@ -35,24 +35,6 @@
|
||||
<description>Object 'A' is never used</description>
|
||||
</problem>
|
||||
|
||||
<problem>
|
||||
<file>companionObjectUnused.kt</file>
|
||||
<line>2</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="companionObjectUnused.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Unused Symbol</problem_class>
|
||||
<description>Object 'Companion' is never used</description>
|
||||
</problem>
|
||||
|
||||
<problem>
|
||||
<file>companionObjectUnused.kt</file>
|
||||
<line>7</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="companionObjectUnused.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Unused Symbol</problem_class>
|
||||
<description>Object 'Named' is never used</description>
|
||||
</problem>
|
||||
|
||||
<problem>
|
||||
<file>usedViaMemberImport.kt</file>
|
||||
<line>11</line>
|
||||
|
||||
Reference in New Issue
Block a user