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:
+1
-1
@@ -14,7 +14,7 @@ class B() {
|
||||
}
|
||||
|
||||
object b {
|
||||
<error descr="[COMPANION_OBJECT_NOT_ALLOWED] A companion object is not allowed here">companion</error> object {
|
||||
<error descr="[WRONG_MODIFIER_CONTAINING_DECLARATION] Modifier 'companion' is not applicable inside 'object'">companion</error> object {
|
||||
val x = 1
|
||||
}
|
||||
// error
|
||||
|
||||
Reference in New Issue
Block a user