I tried to compile one of our projects with Kotlin...
# kotlin-native
r
I tried to compile one of our projects with Kotlin 2.0.0 and compilation fails on this line:
Copy code
jakarta.xml.bind.JAXBContext.newInstance(a.class.generated.with.xjc.MyType::class.java)
The error is > e: file///path/to/kotlin/class/XMLParser.kt520:56 None of the following candidates is applicable: > static fun newInstance(p0: String!): JAXBContext! > static fun newInstance(vararg p0: Class*!): JAXBContext! If I replace the class argument with the string, then this line compiles, but compilation fails on the next line that uses API that takes a class argument (
jakarta.xml.bind.Unmarshaller::unmarshal
)
a
hi, this channel is for Kotlin Native https://kotl.in/native, but your code contains Java classes, so you're using Kotlin JVM. You'd get better help if you reposted in another channel (like #getting-started), or if you made a YouTrack issue https://kotl.in/issue
r
D'oh!