Sort modifiers: process final modifier correctly #KT-22954 fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
e88d5b2a76
commit
b9e7e8fca3
@@ -0,0 +1,10 @@
|
||||
<problems>
|
||||
<problem>
|
||||
<file>test.kt</file>
|
||||
<line>4</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/test.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Non-canonical modifier order</problem_class>
|
||||
<description>Non-canonical modifiers order</description>
|
||||
</problem>
|
||||
</problems>
|
||||
@@ -0,0 +1 @@
|
||||
// INSPECTION_CLASS: org.jetbrains.kotlin.idea.inspections.SortModifiersInspection
|
||||
@@ -0,0 +1,4 @@
|
||||
annotation class Ann
|
||||
|
||||
@Ann
|
||||
abstract public class Test
|
||||
@@ -0,0 +1,10 @@
|
||||
annotation class Ann
|
||||
|
||||
open class Base {
|
||||
open fun bar() {}
|
||||
}
|
||||
|
||||
open class Test : Base() {
|
||||
@Ann
|
||||
<caret>override final fun bar() {}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
annotation class Ann
|
||||
|
||||
open class Base {
|
||||
open fun bar() {}
|
||||
}
|
||||
|
||||
open class Test : Base() {
|
||||
@Ann
|
||||
final override fun bar() {}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
open class Base {
|
||||
open fun foo() {}
|
||||
}
|
||||
|
||||
open class Test : Base() {
|
||||
<caret>override final public fun foo() {}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
open class Base {
|
||||
open fun foo() {}
|
||||
}
|
||||
|
||||
open class Test : Base() {
|
||||
public final override fun foo() {}
|
||||
}
|
||||
Reference in New Issue
Block a user