I am trying to set as private the constructor of i...
# announcements
j
I am trying to set as private the constructor of inline classes (and value classes, I tried both), but I am getting an exception. Is it not supported yet?
m
am running this without a problem
Copy code
@JvmInline
value class Test private constructor(val test: String) {
    companion object {
        fun create(): Test = Test("test")
    }
}

fun main() {
    println(Test.create())
}
is this what you ment?
works with
value
and
inline
class
j
Yeah, it is failing for me but frontend is marking nothing as error
What java version are you using?
I have 1,8 in kotlin options
m
am using Kotlin 1.5.10, Java target 1.8
j
same then
it is strange
i could try to use another jdk
if it fails it has to be a ir error so I would file a bug