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:
Vendored
+2
-2
@@ -1,10 +1,10 @@
|
||||
package d
|
||||
|
||||
<!ILLEGAL_MODIFIER!>override<!> val f : ()-> Int = { 12 }
|
||||
<!WRONG_MODIFIER_TARGET!>override<!> val f : ()-> Int = { 12 }
|
||||
|
||||
fun test() {
|
||||
f()
|
||||
}
|
||||
|
||||
var g: Int = 1
|
||||
<!PACKAGE_MEMBER_CANNOT_BE_PROTECTED!>protected<!> set(i: Int) {}
|
||||
<!WRONG_MODIFIER_CONTAINING_DECLARATION!>protected<!> set(i: Int) {}
|
||||
Reference in New Issue
Block a user