icerockdev / moko-kswift

Swift-friendly api generator for Kotlin/Native frameworks
https://moko.icerock.dev
Apache License 2.0
348 stars 21 forks source link

Invalid generation of enums when sealed class/interface declaration is nested in other class and it's subtypes are not inside sealed class #84

Open Pschsch opened 1 year ago

Pschsch commented 1 year ago

Example:

data class SomeType(
   val field : Field
) {
    sealed class /*interface*/ Field

    data class TextField(val text : String) : Field()
    data class ImageField(val url : String): Field()
}

will generate enum cases:

case field.TextField /*error! dot in name*/
case field.ImageField /*the same*/
...