You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be very nice to generate sealed Java/Kotlin classes whenever possible. This would improve code comprehension, pattern matching, and the IDE experience.
Potential solutions:
Infer which abstract and open Pkl classes can be sealed in Java/Kotlin.
At a minimum, this would require passing all Pkl modules at once to Java/KotlinCodeGenerator so that it can check if a class is subclassed in another module. Currently, Java/KotlinCodeGenerator only accepts a single module whereas CliJava/KotlinCodeGenerator accepts multiple.
Support sealed classes in Pkl. This feels like a cleaner solution and could prove equally useful as supporting open vs. non-open classes.
The text was updated successfully, but these errors were encountered:
It would be very nice to generate sealed Java/Kotlin classes whenever possible. This would improve code comprehension, pattern matching, and the IDE experience.
Potential solutions:
At a minimum, this would require passing all Pkl modules at once to Java/KotlinCodeGenerator so that it can check if a class is subclassed in another module. Currently, Java/KotlinCodeGenerator only accepts a single module whereas CliJava/KotlinCodeGenerator accepts multiple.
The text was updated successfully, but these errors were encountered: