Regular modifier checker implemented (initial version). A set of tests fixed accordingly.

Most of modifier diagnostic is expressed by REDUNDANT_MODIFIER, INCOMPATIBLE_MODIFIERS, REPEATED_MODIFIER, WRONG_MODIFIER_TARGET, WRONG_MODIFIER_PARENT.
A set of modifier diagnostics is not in use now (but not deleted yet).
This commit is contained in:
Mikhail Glukhikh
2015-06-16 13:08:05 +03:00
parent faac06ff7e
commit 4bd48c4796
67 changed files with 588 additions and 616 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
<!SEALED_MODIFIER_IN_ENUM!>sealed<!> enum class SealedEnum {
<!WRONG_MODIFIER_TARGET!>sealed<!> enum class SealedEnum {
FIRST,
SECOND;
+1 -1
View File
@@ -1,3 +1,3 @@
<!FINAL_MODIFIER_IN_SEALED!>final<!> sealed class Base {
<!INCOMPATIBLE_MODIFIERS!>final<!> <!INCOMPATIBLE_MODIFIERS!>sealed<!> class Base {
}
@@ -1,3 +1,3 @@
<!TRAIT_CAN_NOT_BE_SEALED!>sealed<!> interface Base {
<!WRONG_MODIFIER_TARGET!>sealed<!> interface Base {
}
+1 -1
View File
@@ -1,3 +1,3 @@
<!ILLEGAL_MODIFIER!>sealed<!> object Sealed {
<!WRONG_MODIFIER_TARGET!>sealed<!> object Sealed {
}
+1 -1
View File
@@ -1,3 +1,3 @@
<!OPEN_MODIFIER_IN_SEALED!>open<!> sealed class Base {
<!INCOMPATIBLE_MODIFIERS!>open<!> <!INCOMPATIBLE_MODIFIERS!>sealed<!> class Base {
}
@@ -1,3 +1,3 @@
<!ABSTRACT_MODIFIER_IN_SEALED!>abstract<!> sealed class Base {
<!REDUNDANT_MODIFIER!>abstract<!> sealed class Base {
}