miha-x64
05/11/2017, 9:47 AMit doesn’t work because it wouldn’t work in Java tooKotlin is being compiled to JVM-bytecode, not to Java. There’s no nested and/or inner classes at the bytecode level, so there’s no technical restriction to do this. The question is, would nested class have the only one companion object instance, or a companion per outer class? And there’s no such question with this restriction.