Open
Description
Hi, First of all thanks for your work !
It seems than the "Auto" constructor strategy struggle with this kind of readonly inheritence.
abstract readonly class Fruit
{
public function __construct(
public int $weight
) {}
}
final readonly class Banana extends Fruit {}
After deserialisation the "Banana" instance as not been correctly populated and a runtime error is raised :
Typed property Fruit::$weight must not be accessed before initialization
I managed to setup a test to demonstrate the behavior : https://github.com/aegypius/automapper-issue-284.
Metadata
Metadata
Assignees
Labels
No labels