Files
kotlin-fork/compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClass_lv12.fir.kt
T
Nikolay Lunyak 0d19942d2c [FIR] Make reporting of local class diagnostics more consistent with K1
It would be nice to report more appropriate diagnostics at the
corresponding places, but right now it's more important to
fix greenness-redness problems. Plus, this is already how K1 works.

^KT-59900 Fixed
2023-08-31 13:07:00 +00:00

20 lines
511 B
Kotlin
Vendored

// !LANGUAGE: +InnerClassInEnumEntryClass -NestedClassesInEnumEntryShouldBeInner
enum class Enum {
ENTRY_WITH_CLASS {
inner class TestInner
<!NESTED_CLASS_NOT_ALLOWED!>class TestNested<!>
<!NESTED_CLASS_NOT_ALLOWED!>interface TestInterface<!>
<!LOCAL_OBJECT_NOT_ALLOWED!>object TestObject<!>
<!WRONG_MODIFIER_TARGET!>enum<!> class TestEnumClass {
OTHER_ENTRY
}
<!WRONG_MODIFIER_CONTAINING_DECLARATION!>companion<!> object {}
}
}