mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-12 15:53:40 +00:00
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).
12 lines
210 B
Kotlin
Vendored
12 lines
210 B
Kotlin
Vendored
enum class E {
|
|
FIRST,
|
|
|
|
SECOND {
|
|
<!WRONG_MODIFIER_CONTAINING_DECLARATION!>companion<!> object {
|
|
fun foo() = 42
|
|
}
|
|
};
|
|
}
|
|
|
|
fun f() = E.SECOND.<!UNRESOLVED_REFERENCE!>foo<!>()
|