Hello, I am having trouble casting a kotlin sealed...
# getting-started
j
Hello, I am having trouble casting a kotlin sealed class in a java interop situation. Can anyone help me figure it out?
Sealed Class.kt
Java Call.java
a
Right now the
C
class is invalid because data classes require at least 1 constructor property
Try removing the
data
modifier and see if the java code compiles
j
ah okay. i'll check. thanks!
still no dice but i found another workaround, just providing a getter with kotlin casting it. works for now.
thanks!