Unused symbol: fix message for interface #KT-28286 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
56d354223e
commit
bc4d353134
@@ -23,7 +23,7 @@ import org.jetbrains.kotlin.psi.psiUtil.isPropertyParameter
|
|||||||
* @return string description of declaration, like `Function "describe"`
|
* @return string description of declaration, like `Function "describe"`
|
||||||
*/
|
*/
|
||||||
fun KtNamedDeclaration.describe(): String? = when (this) {
|
fun KtNamedDeclaration.describe(): String? = when (this) {
|
||||||
is KtClass -> "Class \"$name\""
|
is KtClass -> "${if (isInterface()) "Interface" else "Class"} \"$name\""
|
||||||
is KtObjectDeclaration -> "Object \"$name\""
|
is KtObjectDeclaration -> "Object \"$name\""
|
||||||
is KtNamedFunction -> "Function \"$name\""
|
is KtNamedFunction -> "Function \"$name\""
|
||||||
is KtSecondaryConstructor -> "Constructor"
|
is KtSecondaryConstructor -> "Constructor"
|
||||||
|
|||||||
@@ -79,4 +79,12 @@
|
|||||||
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Unused symbol</problem_class>
|
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Unused symbol</problem_class>
|
||||||
<description>Property ''bar'' is never used</description>
|
<description>Property ''bar'' is never used</description>
|
||||||
</problem>
|
</problem>
|
||||||
|
<problem>
|
||||||
|
<file>interface.kt</file>
|
||||||
|
<line>1</line>
|
||||||
|
<module>light_idea_test_case</module>
|
||||||
|
<entry_point TYPE="file" FQNAME="temp:///src/interface.kt" />
|
||||||
|
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Unused Symbol</problem_class>
|
||||||
|
<description>Interface 'Interface' is never used</description>
|
||||||
|
</problem>
|
||||||
</problems>
|
</problems>
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
interface Interface
|
||||||
Reference in New Issue
Block a user