Join Slack
Powered by
Hi everyone, Can we use Kotlin sealed classes in J...
# android
s
Sergio C.
11/15/2022, 6:12 PM
Hi everyone, Can we use Kotlin sealed classes in Java with switch statements? I want to switch on all the branches from Java.
e
ephemient
11/15/2022, 11:55 PM
https://youtrack.jetbrains.com/issue/KT-41214/JDK-17-Emit-PermittedSubclasses-attribute-when-compiling-sealed-classes
as long as you are targeting and using Java 17+
s
Sergio C.
11/16/2022, 9:03 AM
Thanks for the links, but I'm limited to Java 11 at best on Android. I'll do a workarround.
4
Views
Open in Slack
Previous
Next