Error when required members are not set#60101
Merged
333fred merged 8 commits intodotnet:features/required-membersfrom Mar 17, 2022
Merged
Error when required members are not set#60101333fred merged 8 commits intodotnet:features/required-membersfrom
333fred merged 8 commits intodotnet:features/required-membersfrom
Conversation
Implements reading the required members list of a type, and enforces that required members are all set by an initializer on the constructor. Required members must be initialized with values, not with nested object initializers. Test plan dotnet#57046. Specification https://github.com/dotnet/csharplang/blob/main/proposals/required-members.md
Member
Author
|
@jcouv @RikkiGibson please take a look. |
Member
Author
|
As a general note, I scoured the codebase for other places where |
Youssef1313
reviewed
Mar 11, 2022
RikkiGibson
reviewed
Mar 11, 2022
src/Compilers/CSharp/Test/Symbol/Symbols/RequiredMembersTests.cs
Outdated
Show resolved
Hide resolved
src/Compilers/CSharp/Portable/Symbols/Source/SourceMemberContainerSymbol.cs
Show resolved
Hide resolved
Youssef1313
reviewed
Mar 11, 2022
* Support checking attribute constructors * Suppress some duplicate diagnostics * Minor other feedback.
Member
Author
|
@RikkiGibson addressed your feedback. Please take another look. |
RikkiGibson
approved these changes
Mar 11, 2022
Member
Author
|
@jcouv for a second review. |
jcouv
reviewed
Mar 15, 2022
jcouv
reviewed
Mar 15, 2022
jcouv
reviewed
Mar 15, 2022
jcouv
reviewed
Mar 15, 2022
jcouv
reviewed
Mar 15, 2022
jcouv
reviewed
Mar 15, 2022
jcouv
reviewed
Mar 15, 2022
jcouv
reviewed
Mar 15, 2022
jcouv
reviewed
Mar 15, 2022
jcouv
reviewed
Mar 15, 2022
Member
jcouv
left a comment
There was a problem hiding this comment.
Done with review pass (iteration 2). Will look at tests this afternoon
…o enforce-setting * upstream/features/required-members: (78 commits) [main] Update dependencies from dotnet/roslyn (dotnet#59792) Annotate BreakpointSpans and fix NREs (dotnet#59846) Editor namespaces refactoring - part 1 (dotnet#59907) [main] Update dependencies from dotnet/source-build-externals (dotnet#59845) Update PublishData.json (dotnet#59952) ...and the comment Revert the last change in the compiler layer Force SVsExtensionManager to load before InProcComponent creation Handle nameof situation, moved logic back to workspaces layer Add back OmniSharpInlineHints (dotnet#59941) Initialize AsyncCompletionTracker in a fire-and-forget manner Try to load the extension manager from the main thread as well Use the correct GUID for SVsUserNotificationsService Update CodeStyle/format/SDK versions (dotnet#59903) Create attribute default arguments during binding (dotnet#59750) Undo refactoring part 2 Undo refactoring Move logic of symbol filtering to compiling layer. Refactoring Clean up diagnostic and solution crawler options - take 2 (dotnet#59233) Add quotes in string for clarity ...
jcouv
reviewed
Mar 16, 2022
jcouv
reviewed
Mar 16, 2022
Currently, ImmutableSegmentedDictionary cannot be used as a Sentinel value, because there is no way to make a sentinel that is different from Empty or default. This adds the ability to make a new empty dictionary, as well as a way to compare two ImmutableSegmentedDictionaries for reference equality.
Member
Author
jcouv
approved these changes
Mar 17, 2022
Member
jcouv
left a comment
There was a problem hiding this comment.
LGTM Thanks (iteration 6) with one test to consider
jcouv
reviewed
Mar 17, 2022
sharwell
reviewed
Mar 17, 2022
sharwell
reviewed
Mar 17, 2022
sharwell
reviewed
Mar 17, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements reading the required members list of a type, and enforces that required members are all set by an initializer on the constructor. Required members must be initialized with values, not with nested object initializers.
Test plan #57046.
Specification https://github.com/dotnet/csharplang/blob/main/proposals/required-members.md