Add 'Covariant equals' inspection
#KT-29798 Fixed
This commit is contained in:
committed by
Dmitry Gridin
parent
3998e842f1
commit
61f3e776a7
@@ -3333,6 +3333,15 @@
|
||||
language="kotlin"
|
||||
/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.KotlinCovariantEqualsInspection"
|
||||
displayName="Covariant 'equals()'"
|
||||
groupPath="Kotlin"
|
||||
groupName="Probable bugs"
|
||||
enabledByDefault="true"
|
||||
level="WARNING"
|
||||
language="kotlin"
|
||||
/>
|
||||
|
||||
<referenceImporter implementation="org.jetbrains.kotlin.idea.quickfix.KotlinReferenceImporter"/>
|
||||
|
||||
<fileType.fileViewProviderFactory filetype="KJSM" implementationClass="com.intellij.psi.ClassFileViewProviderFactory"/>
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
This inspection reports <b>equals()</b> methods taking an argument type other than <b>Any?</b>.
|
||||
Only reports if the containing class does not have another <b>equals()</b> method which does take <b>Any?</b> as its argument type.
|
||||
Normally, this is a mistake.
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user