mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-18 08:31:38 +00:00
In most of the cases it was used together with CLASS_ONLY and vice versa They only case when CLASS_ONLY was used without INNER_CLASS is possibleParentTargetMap.COMPANION_KEYWORD. But after diagnostic NESTED_OBJECT_NOT_ALLOWED has been introduced, there's no sense in the restriction of exactly the companion's parent For clarification see test data changed
26 lines
408 B
Kotlin
Vendored
26 lines
408 B
Kotlin
Vendored
// http://youtrack.jetbrains.net/issue/KT-449
|
|
|
|
class A {
|
|
inner class B {
|
|
companion <!NESTED_OBJECT_NOT_ALLOWED!>object<!> { }
|
|
}
|
|
}
|
|
|
|
class B {
|
|
companion object {
|
|
class B {
|
|
companion object {
|
|
class C {
|
|
companion object { }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
class C {
|
|
class D {
|
|
companion object { }
|
|
}
|
|
}
|