Files
kotlin-fork/compiler/testData/diagnostics/tests/inner/nestedObject.kt
T
Denis Zharkov a3baca829f Drop KotlinTarget.INNER_CLASS entry
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
2017-02-20 13:24:42 +03:00

13 lines
270 B
Kotlin
Vendored

// SKIP_TXT
class Outer {
inner class Inner1 {
<!NESTED_OBJECT_NOT_ALLOWED!>object Obj1<!>
companion <!NESTED_OBJECT_NOT_ALLOWED!>object Obj2<!>
inner class Inner2 {
<!NESTED_OBJECT_NOT_ALLOWED!>object Obj3<!>
}
}
}