Files
kotlin-fork/compiler/testData/diagnostics/tests/annotations/kt1886annotationBody.kt
T
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

30 lines
817 B
Kotlin
Vendored

annotation class Annotation2() <!ANNOTATION_CLASS_WITH_BODY!>{
public val s: String = ""
}<!>
annotation class Annotation3() <!ANNOTATION_CLASS_WITH_BODY!>{
public fun foo() {}
}<!>
annotation class Annotation4() <!ANNOTATION_CLASS_WITH_BODY!>{
class Foo() {}
}<!>
annotation class Annotation5() <!ANNOTATION_CLASS_WITH_BODY!>{
<!WRONG_MODIFIER_CONTAINING_DECLARATION!>companion<!> object {}
}<!>
annotation class Annotation6() <!ANNOTATION_CLASS_WITH_BODY!>{
init {}
}<!>
annotation class Annotation1() <!ANNOTATION_CLASS_WITH_BODY!>{}<!>
annotation class Annotation7(val name: String) <!ANNOTATION_CLASS_WITH_BODY!>{}<!>
annotation class Annotation8(var name: String = "") <!ANNOTATION_CLASS_WITH_BODY!>{}<!>
annotation class Annotation9(val name: String)
annotation class Annotation10