-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle parameterless ctors in structs in STJ's ReflectionEmitMemberAccessor #62989
Conversation
…dynamic code generation
Tagging subscribers to this area: @dotnet/area-system-text-json Issue DetailsFixes #62983 I assume the bugfix needs backporting to 6.0?
|
...braries/System.Text.Json/tests/System.Text.Json.Tests/NewtonsoftTests/JsonSerializerTests.cs
Outdated
Show resolved
Hide resolved
|
||
public struct StructWithPropertyInit | ||
{ | ||
public long A { get; set; } = 42; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider for completeness one more test where you explicitly set this to something else (i.e. 43) in the JSON and make sure this got respected
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with optional suggestion
…n-deserialize-structs-ctor
/backport to release/6.0 |
/backport to release/6.0 |
Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/2154658059 |
@EgorBo an error occurred while backporting to release/6.0, please check the run log for details! Error: @EgorBo is not a repo collaborator, backporting is not allowed. If you're a collaborator please make sure your Microsoft team membership visibility is set to Public on https://github.com/orgs/microsoft/people?query=EgorBo |
/backport to release/6.0 |
Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/2154672050 |
@EgorBo an error occurred while backporting to release/6.0, please check the run log for details! Error: @EgorBo is not a repo collaborator, backporting is not allowed. If you're a collaborator please make sure your Microsoft team membership visibility is set to Public on https://github.com/orgs/microsoft/people?query=EgorBo |
…ructs in STJ's ReflectionEmitMemberAccessor"
…onEmitMemberAccessor (#67901) * [release/6.0] backport #62989 "Handle parameterless ctors in structs in STJ's ReflectionEmitMemberAccessor" * Add explicit parameterless constructors in the tests * Update ConstructorTests.ParameterMatching.cs * address feedback Co-authored-by: Eirik Tsarpalis <[email protected]>
Fixes #62983
I assume the bugfix needs backporting to 6.0?