Hi, I'm wondering if Im missing something obvious ...
# serialization
j
Hi, I'm wondering if Im missing something obvious here. Given this class:
Copy code
class Foo(
    @Transient var name: String,
    var bar: String,
)
the compiler shows an error for the
name
property:
This property is marked as @Transient and therefore must have an initializing expression
Given that this is a primary constructor parameter, I don't see why having a default value is still a requirement since it must be initialized. Any thoughts on this?
1
In fact I was missing something obvious. The plugin-generated serializer would have no way of passing in a meaningful argument, so it needs a default value.
👍 1