Skip to content

Support declaration and emit of required members in source#58507

Merged
333fred merged 11 commits intodotnet:features/required-membersfrom
333fred:declaration-errors
Feb 4, 2022
Merged

Support declaration and emit of required members in source#58507
333fred merged 11 commits intodotnet:features/required-membersfrom
333fred:declaration-errors

Conversation

@333fred
Copy link
Copy Markdown
Member

@333fred 333fred commented Dec 28, 2021

Adding required to a member now results in the type having a RequiredMembersAttribute emitted with the name of that member as the contents. Reading this data from metadata is not yet supported, nor is adding the requisite ObsoleteAttribute to constructors that depend on such contracts. The rules for when required is allowed and when it is disallowed are documented in dotnet/csharplang#5566.

Test plan: #57046

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Compilers Feature - Required Members Required properties and fields

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants