a3baca829f
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
18 lines
540 B
Kotlin
Vendored
18 lines
540 B
Kotlin
Vendored
class A {
|
|
inner class I {
|
|
companion <!NESTED_OBJECT_NOT_ALLOWED!>object A<!>
|
|
|
|
<!MANY_COMPANION_OBJECTS!>companion<!> <!NESTED_OBJECT_NOT_ALLOWED!>object B<!>
|
|
|
|
<!MANY_COMPANION_OBJECTS!>companion<!> <!NESTED_OBJECT_NOT_ALLOWED!>object C<!>
|
|
}
|
|
}
|
|
|
|
object O {
|
|
<!WRONG_MODIFIER_CONTAINING_DECLARATION!>companion<!> object A
|
|
|
|
<!MANY_COMPANION_OBJECTS, WRONG_MODIFIER_CONTAINING_DECLARATION!>companion<!> object B
|
|
|
|
<!MANY_COMPANION_OBJECTS, WRONG_MODIFIER_CONTAINING_DECLARATION!>companion<!> object C
|
|
}
|