Unused symbol: secondary constructors are also under analysis #KT-10812 Fixed
This commit is contained in:
@@ -69,4 +69,13 @@
|
||||
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Unused Symbol</problem_class>
|
||||
<description>Class 'WithNativeAnnotation' is never used</description>
|
||||
</problem>
|
||||
|
||||
<problem>
|
||||
<file>secondaryConstructor.kt</file>
|
||||
<line>3</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/secondaryConstructor.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Unused symbol</problem_class>
|
||||
<description>Constructor is never used</description>
|
||||
</problem>
|
||||
</problems>
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
class Owner(val name: String, val code: Int) {
|
||||
constructor(name: String): this(name, 0)
|
||||
constructor(code: Int): this("", code)
|
||||
}
|
||||
|
||||
@test.anno.EntryPoint
|
||||
fun use(): Int {
|
||||
val owner = Owner("xyz")
|
||||
return if (owner.name != "") owner.code else -1
|
||||
}
|
||||
Reference in New Issue
Block a user