typeshare icon indicating copy to clipboard operation
typeshare copied to clipboard

remove unused generics/phantomdata in generated code

Open Pesky01 opened this issue 1 year ago • 0 comments

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.

Pesky01 avatar Jul 02 '23 00:07 Pesky01