Files
kotlin/compiler/testData/diagnostics/tests/declarationChecks/localDeclarationModifiers.kt
Mikhail Glukhikh 4bd48c4796 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).
2015-08-03 19:41:50 +03:00

12 lines
345 B
Kotlin
Vendored

package d
class T {
fun baz() = 1
}
fun foo() {
<!WRONG_MODIFIER_TARGET!>public<!> val <!UNUSED_VARIABLE!>i<!> = 11
<!WRONG_MODIFIER_TARGET!>abstract<!> val <!VARIABLE_WITH_NO_TYPE_NO_INITIALIZER, UNUSED_VARIABLE!>j<!>
<!WRONG_MODIFIER_TARGET!>override<!> fun T.baz() = 2
<!WRONG_MODIFIER_TARGET!>private<!> fun bar() = 2
}