thana
02/23/2021, 1:28 PM@Serializable sealed class SuperType
. Now we decided to add a method to all subtypes that basically create a copy from themselfs. Obvispously they are supposed to return their own type.
Hence e cahnged the declaration to @Serializable sealed class SuperType<T: SuperType<T>>
we can decalre the subtypes like class SubType: SuperType<SubType>{ override fun createCopy(): SubType = TODO() }
Unfortunately this seem to create a endless recursion in the compiler plugin generating the serializer for it. is this a known bug? is it a bug at all?thana
02/23/2021, 1:41 PMCLOVIS
02/23/2021, 2:50 PMsealed class A {
abstract fun foo(): A
}
class B : A() {
override fun foo(): B { ... }
}