Uh oh!
There was an error while loading. Please reload this page.
Fix source generation support for tuples with explicitly named elements - #58644
Conversation
ghost
commented
Sep 3, 2021
Tagging subscribers to this area: @eiriktsarpalis, @layomia Issue DetailsWhen querying a ValueTuple type symbol for fields, the returned symbols include any explicitly named tupled elements. These do not correspond to runtime properties and as such should be filtered from the generated code. Note that while the source generator could take advantage of this compile-time metadata, emitting serialization code that accounts for explicitly named tuple elements would diverge from the reflection-based behaviour. As such, all tuples will be serialized as Should be backported to release/6.0. Fixes #58137.
|
eiriktsarpalis
commented
Sep 6, 2021
/backport to release/6.0 |
Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1205881963 |
When querying a ValueTuple type symbol for fields, the returned symbols include any explicitly named tupled elements. These do not correspond to runtime properties and as such should be filtered from the generated code.
Note that while the source generator could take advantage of this compile-time metadata, emitting serialization code that accounts for explicitly named tuple elements would diverge from the reflection-based behaviour. As such, all tuples will be serialized as
{ "Item1" : 1, "Item2" : 2 , ... }regardless of any element labels used at compile time.Should be backported to release/6.0.
Fixes#58137.