Currently, Serde tries to use the default value from a matching-name constructor parameter as a default for a property. That's fine if it's a promoted property. If there is a constructor parameter that matches the name of a separately defined property, however, and they don't have the same type, type errors can occur.
Context
Ran into this in MiDy.
Possible implementation
Should be pretty easy to add an extra isPromoted check in Field.
Detailed description
Currently, Serde tries to use the default value from a matching-name constructor parameter as a default for a property. That's fine if it's a promoted property. If there is a constructor parameter that matches the name of a separately defined property, however, and they don't have the same type, type errors can occur.
Context
Ran into this in MiDy.
Possible implementation
Should be pretty easy to add an extra isPromoted check in Field.