refactor
This commit is contained in:
parent
67685c7d57
commit
85763df893
1 changed files with 4 additions and 4 deletions
|
|
@ -35,13 +35,13 @@ const val FactorioObjectDataDiscriminatorKey: String = "object_name"
|
|||
sealed class FactorioObjectData {
|
||||
|
||||
// workaround - https://github.com/Kotlin/kotlinx.serialization/issues/1664
|
||||
val objectName: String by lazy {
|
||||
serializer().descriptor.serialName
|
||||
}
|
||||
|
||||
// val objectName: String by lazy {
|
||||
// kotlinx.serialization.serializer(this::class.starProjectedType).descriptor.serialName
|
||||
// }
|
||||
val objectName: String by lazy {
|
||||
serializer().descriptor.serialName
|
||||
// kotlinx.serialization.serializer(this::class.starProjectedType).descriptor.serialName
|
||||
}
|
||||
|
||||
// alternative: find the @SerialName annotation
|
||||
// Again it must be delegated so there's no backing field and kxs ignores it
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue