Check if modality is refined in "Redundant modifier" inspection
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<problems>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>22</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Redundant modality modifier</problem_class>
|
||||
<description>Redundant modality modifier</description>
|
||||
</problem>
|
||||
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>23</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="NOT_USED_ELEMENT_ATTRIBUTES">Redundant modality modifier</problem_class>
|
||||
<description>Redundant modality modifier</description>
|
||||
</problem>
|
||||
</problems>
|
||||
@@ -0,0 +1 @@
|
||||
// INSPECTION_CLASS: org.jetbrains.kotlin.idea.inspections.RedundantModalityModifierInspection
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
annotation class AllOpen
|
||||
|
||||
@AllOpen
|
||||
class TestWithAllOpen {
|
||||
val prop: String = ""
|
||||
fun method() {}
|
||||
|
||||
open val openProp: String = ""
|
||||
open fun openMethod() {}
|
||||
|
||||
final val finalProp: String = ""
|
||||
final fun finalMethod() {}
|
||||
}
|
||||
|
||||
class TestWithoutAllOpen {
|
||||
val prop: String = ""
|
||||
fun method() {}
|
||||
|
||||
open val openProp: String = ""
|
||||
open fun openMethod() {}
|
||||
|
||||
final val finalProp: String = ""
|
||||
final fun finalMethod() {}
|
||||
}
|
||||
Reference in New Issue
Block a user