0d19942d2c
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
20 lines
511 B
Kotlin
Vendored
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 {}
|
|
}
|
|
}
|