4bd48c4796
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).
20 lines
386 B
Kotlin
Vendored
20 lines
386 B
Kotlin
Vendored
// ERROR: Body is not allowed for annotation class
|
|
// ERROR: Modifier 'companion' is not applicable inside 'annotation class'
|
|
annotation class Anon(public val value: String) {
|
|
|
|
public enum class E {
|
|
A, B
|
|
}
|
|
|
|
companion object {
|
|
|
|
public val field: E = E.A
|
|
}
|
|
}
|
|
|
|
Anon("a")
|
|
interface I {
|
|
companion object {
|
|
public val e: Anon.E = Anon.field
|
|
}
|
|
} |