Just move the objects from the companion object into the sealed class
r
reactormonk
07/08/2022, 10:00 AM
Huh, weird. Must be a Java thing? Does that mean they're properly attached to static namespace, or still part of a class instance?
k
Klitos Kyriacou
07/08/2022, 10:33 AM
Nested classes in Kotlin are like static nested classes in Java, i.e. they are not associated with an instance of their parent class, unless they are preceded by the
inner
keyword. Similarly with nested objects (in fact, I'm not sure what an "inner object" would even mean, if it were allowed).