mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-12 08:31:28 +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).
25 lines
419 B
Kotlin
Vendored
25 lines
419 B
Kotlin
Vendored
// http://youtrack.jetbrains.net/issue/KT-449
|
|
|
|
class A {
|
|
inner class B {
|
|
<!WRONG_MODIFIER_CONTAINING_DECLARATION!>companion<!> object { }
|
|
}
|
|
}
|
|
|
|
class B {
|
|
companion object {
|
|
class B {
|
|
companion object {
|
|
class C {
|
|
companion object { }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
class C {
|
|
class D {
|
|
companion object { }
|
|
}
|
|
} |