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
Class-level [Arguments] numeric literals are rewritten using test method parameter types #7440
Source generation uses test method parameter types when emitting class-level [Arguments]. A decimal test parameter can therefore rewrite an integer constructor argument as a decimal literal, so a generic class with multiple class sources can fail constructor binding. Class arguments should be emitted against constructor parameters.
Inspect generated class data sources: GenerateArgumentsAttributeWithParameterTypes uses methodSymbol.Parameters for class attributes too, changing [Arguments(1)] to ArgumentsAttribute(1m). With multiple class sources the concrete factory calls Activator.CreateInstance(typeof(C<int>), args); a boxed decimal cannot bind to its int constructor.
Expected and actual
Class argument 1 remains an int, independent of the test method parameter types. Currently the emitter selects the decimal method parameter and appends m to the class argument. This is a code-inspection finding; the fixture above has not been executed locally.
Activity
Fix decimal argument expression formatting for #7440
Preserve runtime conversions for decimal argument constants (#7440)
Fix generic class row constructor conversions (#7440)
Preserve required members and pack constructor params rows (#7440)
Preserve omitted optional constructor array defaults (#7440)
Fix class argument emission to use constructor parameters (#7440)
Fix decimal argument expression formatting for #7440
Preserve runtime conversions for decimal argument constants (#7440)
Fix generic class row constructor conversions (#7440)
Preserve required members and pack constructor params rows (#7440)
Preserve omitted optional constructor array defaults (#7440)
Handle nullable constructor targets in tuple source binding (#7440)
14 remaining items
Preserve omitted optional constructor array defaults (#7440)
Handle nullable constructor targets in tuple source binding (#7440)
Preserve constructor whole-array conversions for #7440
Update constructor array conversion snapshot for #7440
Fix class-row factory selection and floating conversion for #7440
Preserve referenced class row values during emission (#7440)
Fix single constructor rows and referenced generic arrays (#7440)
Fix required fields in typed class-row factories (#7440)
Preserve boxed enum types in referenced array arguments (#7440)
Preserve required member state in generic class factories (#7440)
Preserve selected generic constructor cache identity (#7440)
Refresh class-row snapshot for metadata-aware factories (#7440)
Fix by-reference class constructor calls for #7440
Fix class argument literals to use constructor parameter types (#7496)