-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Required Members for VB #66084
Conversation
20e700b
to
f936bbc
Compare
* Block inheriting from types with required members * Block calling constructors with invalid required member lists * Block substituting types with required members in As New, unless the parameterless ctor has SetsRequiredMembers.
@dotnet/roslyn-compiler @AlekseyTs this should be ready for review. |
@dotnet/roslyn-compiler @AlekseyTs for review please. |
src/Compilers/VisualBasic/Portable/Binding/Binder_ObjectInitializer.vb
Outdated
Show resolved
Hide resolved
src/Compilers/VisualBasic/Portable/Binding/Binder_ObjectInitializer.vb
Outdated
Show resolved
Hide resolved
src/Compilers/VisualBasic/Portable/Symbols/ConstraintsHelper.vb
Outdated
Show resolved
Hide resolved
src/Compilers/VisualBasic/Portable/Symbols/ConstraintsHelper.vb
Outdated
Show resolved
Hide resolved
src/Compilers/VisualBasic/Portable/Symbols/ConstraintsHelper.vb
Outdated
Show resolved
Hide resolved
src/Compilers/VisualBasic/Portable/Symbols/ConstraintsHelper.vb
Outdated
Show resolved
Hide resolved
src/Compilers/VisualBasic/Portable/Symbols/ConstraintsHelper.vb
Outdated
Show resolved
Hide resolved
* Remove Nothing handling to align with C#. * Remove suppressions of cascading errors. * Expand unbound test coverage. * Expand tuple test coverage.
@AlekseyTs addressed feedback. In reply to: 1470886843 |
* upstream/main: (2060 commits) implement code folding for anonymous objects Cleanup/perf in creating member maps. (dotnet#67997) Address feedback, clean the use of ILegacyGlobalOptionsWorkspaceService Update Publish.json Semantic snippets: Add inline statement snippets (dotnet#67819) Update VSSDK Build tools version Update doc comment Address feedback Move declaration near reference Address feedback Avoid stack overflow due to deep recursion on long chain of calls. (dotnet#67913) Check ILegacyGlobalOptionsWorkspaceService is null test scout queue add test update editor "Where" clause typo fix (dotnet#68002) Use `Keyword` helper method instead of hardcoding keyword help terms Move the SyntaxTree and SemanticModel action based analyzers to respect context.FilterSpan EnC refactoring: Align wrappers with contracts better (dotnet#67967) Include EA.RazorCompiler in source build (dotnet#67996) ...
...ompilers/VisualBasic/Portable/Lowering/LocalRewriter/LocalRewriter_TupleLiteralExpression.vb
Show resolved
Hide resolved
src/Compilers/VisualBasic/Test/Semantic/Semantics/RequiredMembersTests.vb
Show resolved
Hide resolved
src/Compilers/VisualBasic/Test/Semantic/Semantics/RequiredMembersTests.vb
Show resolved
Hide resolved
Done with review pass (commit 17) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (commit 19)
src/Compilers/VisualBasic/Portable/Symbols/Retargeting/RetargetingFieldSymbol.vb
Outdated
Show resolved
Hide resolved
src/Compilers/VisualBasic/Test/Semantic/Semantics/RequiredMembersTests.vb
Show resolved
Hide resolved
src/Compilers/VisualBasic/Test/Semantic/Semantics/RequiredMembersTests.vb
Outdated
Show resolved
Hide resolved
src/Compilers/VisualBasic/Test/Semantic/Semantics/RequiredMembersTests.vb
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done with review pass (iteration 19)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM Thanks (iteration 22)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (commit 22)
Implements support for required members in VB. We support creating new instances of types with required members and ensuring that all required members are set in an object initializer. We do not support inheriting from a type with required members, as that would require emitting new metadata for these cases. Closes #61435.
Relates to test plan #57046