I may have interpreted this wrong <https://youtrac...
# compiler
e
I may have interpreted this wrong https://youtrack.jetbrains.com/issue/KT-68688 But doesn't this basically kill a language feature in multiplatform projects? Like, what if I want to declare an expect class, but I want to create an instance in some other way? See my example in the issue.
p
You can declare no constructor in expect class. In that case you wouldn't be able to create it with constructor call in common code. As you can't write implementation in expect class anyway, that's effectivly same as having private constructor.
e
@Pavel Kunyavskiy [JB] thanks! So basically
Copy code
public expect class MyClass {
    public companion object {
        public fun create()
    }
}
Is equivalent to the example in the issue, correct?
p
In my understanding it should be. I can't check right now.
e
No problem! I think before removing the capability it's worth checking on your side if it can be reproduced in some other way (like the no-ctor one), and maybe document it somewhere