Use pattern-matching in MetadataWriter for readability and possibly performance.#36219
Merged
Conversation
gafter
commented
Jun 6, 2019
|
|
||
| IEventDefinition eventDef = definition as IEventDefinition; | ||
| if (eventDef != null) | ||
| return definition switch |
Member
Author
There was a problem hiding this comment.
definition [](start = 19, length = 10)
:)
| case ITypeReference marshallerTypeRef: | ||
| this.SerializeTypeName(marshallerTypeRef, writer); | ||
| break; | ||
| case { }: |
Contributor
There was a problem hiding this comment.
not: case string s? #ByDesign
Member
Author
There was a problem hiding this comment.
I was trying not to modify the semantics of the code as written.
In reply to: 291407933 [](ancestors = 291407933)
Contributor
|
Did you use the IDE features for this? |
Member
Author
|
For a few of them, yes. In reply to: 499704024 [](ancestors = 499704024) |
jcouv
reviewed
Jun 14, 2019
| case ITypeReference marshallerTypeRef: | ||
| this.SerializeTypeName(marshallerTypeRef, writer); | ||
| break; | ||
| case { }: |
Member
There was a problem hiding this comment.
nit: I think we prefer the more specific case object: over case { }: #Closed
jcouv
approved these changes
Jun 14, 2019
jcouv
left a comment
Member
There was a problem hiding this comment.
LGTM Thanks (iteration 1) with a suggestion on case { }
Member
Author
|
@dotnet/roslyn-compiler May I please have a second review from the compiler team for this tiny bug fix? |
RikkiGibson
approved these changes
Jul 2, 2019
canton7
added a commit
to canton7/roslyn
that referenced
this pull request
Jul 9, 2019
…ncat-order * upstream/master: (1532 commits) Ensure we have stack spilling support for the recently-added expression node `BoundReadOnlySpanFromArray` (dotnet#37057) Review feedback Avoid generating or emitting NullablePublicOnlyAttribute when no other nullable attributes are emitted (dotnet#37019) Respond to more feedback Fixes from feedback Call `.WithoutNullability()` less Fix ngen for assets from nuget Make NullableWalker aware of calls to Interlocked.CompareExchange fix error Update AnonymousObjectCreation implementation to be more robust to errors by using MemberIndexOpt. Address minor PR comments. Add support to ngen assets included from nuget package Modified node removal to keep original leading trivia Fix Solution.WithDocumentFilePath not updating the file path of the tree Improve docs. PR Feedback cleanup. Use pattern-matching in MetadataWriter for readability and possibly performance. (dotnet#36219) Renamed helpers in SyntaxFactsService. More RefactoringHelpers tests (mostly for extraction). Add general tests for RefactoringHelpersService. Optimize flow analysis assembly ...
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.
No description provided.