Created
February 26, 2019 15:34
-
-
Save controlflow/fcaf0da27f8df9b51e803f7c5637f24e to your computer and use it in GitHub Desktop.
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
var tupleTypeComponent = tupleType.ComponentOrNull(componentIndex); | |
if (tupleTypeComponent != null) | |
{ | |
var actualTypeName = tupleTypeComponent.Value.ExplicitName ?? TupleTypeComponent.GetDefaultComponentName(componentIndex); | |
consumer.AddHighlighting(new DeconstructionSubpatternWrongTupleComponentNameError(subpattern, actualTypeName)); | |
} |
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
if (tupleType.ComponentOrNull(componentIndex) is { ExplicitName: var explicitName }) | |
{ | |
var actualTypeName = explicitName ?? TupleTypeComponent.GetDefaultComponentName(componentIndex); | |
consumer.AddHighlighting(new DeconstructionSubpatternWrongTupleComponentNameError(subpattern, actualTypeName)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment