Instead of inner
classes. Make it so inner classes go inside the base of classes, and static classes go in companion objects. Besides breaking compatibility with lots of code, I see no reason why this isn’t a good idea. It makes more sense with how Kotlin companion objects work.
class Test {
val thing = "Hi"
class Inner {
init {
print(thing)
}
}
companion object {
class StaticClass {
init {
print(thing) // Error!
}
}
}
}