You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Find a record's synthesized members through IRecordFacet, not by name #222
Replace the name-based lookup of a record's synthesized members in the aspects with Metalama 2027.0's record facet. Needs #173.
ValueObjectDeclaration.cs finds a hand-written PrintMembers by name (method is { Name: "PrintMembers", ... }, around line 389). Metalama 2027.0 adds INamedType.Facets, where IRecordFacet exposes the members the compiler synthesizes for a record: EqualityContract, PrintMembers, the copy constructor and Deconstruct (release notes, "Type facets").
To measure
Whether the facet identifies a user-declared PrintMembers, which replaces the synthesized one, or only the synthesized members. If it can't tell them apart, the name lookup stays and this closes as not planned.
Any other lookup of a record member by name in src/CodoMetis.TypeKit.Generators (git grep for the names above), handled the same way.
Done when
The same answers on the existing tests over the record shapes of the generated-type axes, with the lookup going through the facet. This is a refactor with no behaviour change, shown by a seeded hand-written PrintMembers in a base record still being reported.
Activity