typeshare
typeshare copied to clipboard
remove unused generics/phantomdata in generated code
Was running into #92 when generating some definitions. Only implemented for named field structs (is PhantomData used elsewhere?). I'm not familiar with Kotlin/Scala so wasn't sure what the generated code should look like for the tests (Swift/TS pass).
Rust: struct UnusedGenericsEmptyStruct<A, B, C> {}
Kotlin generates: object UnusedGenericsEmptyStruct
instead of data class UnusedGenericsEmptyStruct()
Scala generates: class UnusedGenericsEmptyStruct extends Serializable
instead of case class UnusedGenericsEmptyStruct()
Are these right? (Tests don't pass for Kotlin/Scala right now due to above) Can update tests to what the expected gen should be and fix any issues.