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
Joshua Hansen
01/02/2025, 9:04 PM
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.