putting those properties in top-level and annotati...
# announcements
a
putting those properties in top-level and annotating the file:
Copy code
@file:JvmName("TestCompanion")

const val FOO = "FOO"

class TestCompanion {
}
produces byte code that decompiles to:
Copy code
import org.jetbrains.annotations.NotNull;

public final class TestCompanion {
   @NotNull
   public static final String FOO = "FOO";
}
s
@arekolek But this will create duplicate class if you add functionality into
TestCompanion