I have a library with a primary constructor and a ...
# getting-started
e
I have a library with a primary constructor and a bunch of secondary ones:
Copy code
open class GlfwWindow(var handle: Long) {
    constructor(..)
    constructor(..)
}
using this library from Java, it says that those secondary constructors have private access.. (from Kotlin it's fine though) what is happening? If I browse the source code I can see the default modifier being
public
and not
private
..
c
Is one of the arguments of the constructors a value class?
e
yes
is that?
c
There's a weird thing with Java interop with value classes in constructors, I don't remember what it is exactly, but it's been discussed before
👍 1
e
thanks for the hint, though!
c
e
are they mangling constructors as well? 😕
c
I think so, there's no other way
e
it's hidden indeed
c
The last time someone asked, they created a YouTrack ticket, but I don't remember which one it is. As far as I remember, the recommendation is to create your own overload that delegates to the real constructor
e
I don't get one thing though: if I call that from the java tests from within the same projects, it compiles fine..
c
Probably something similar to
internal
. Check what values you can pass to it, does it actually run the value class' constructor?
e
ah, it fires the error on runtime
I tried but I couldn't find the issue on YouTrack, pity Anyway, thanks for the help