-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
Milestone
Description
Championed issue: dotnet/csharplang#4394
Spec: https://github.com/dotnet/csharplang/blob/main/proposals/csharp-10.0/extended-property-patterns.md
Initial PR: #52139
Compilers
- Verify a conditional access is not allowed in place of the name
- IOperation and CFG (using
{ Prop1: { Prop2: pattern } }translation, seeExtendedPropertyPatterns_IOperation_*,ExtendedPropertyPatterns_IOperationOnMissing) - Semantic Model (
GetSymbolInfo,GetTypeInfo, seeExtendedPropertyPatterns_SymbolInfo_*) - nullable analysis
- do we learn from member accesses, i.e. not null state for nested members?
- do we learn from pure null tests? (see
OtherComparisonsAsPureNullTests_ExtendedProperties_PureNullTest) - nullable value types
- Pattern Explainer (do we give correct examples in a non-exhaustive match, see
ExtendedPropertyPatterns_Explainer) - definite assignment (mark read fields, see
ExtendedPropertyPatterns_05) - Verify all existing scenarios (where the name is optional or disallowed) work as expected with a member access (see
ExtendedPropertyPatterns_ExpressionColonIn*) - inaccessible properties/fields (see
ExtendedPropertyPatterns_Inaccessible*) - expression tree (see
ExtendedPropertyPatterns_ExpressionTree) - Language Version
- SyntaxNormalizer (see
TestNormalizeExtendedPropertyPattern) - Obsolete (see
ExtendedPropertyPatterns_Obsolete*) - Keep rejecting null-suppression and pointer access in patterns (issue Reject null-suppression operator in patterns #53484)
- Count checked fields as used (issue False warning: pattern matching on a field doesn't count as a use #52956)
- evaluation order
- static properties/fields (errors)
- API shape (unshipped, syntax)
- EnC (nothing special)
- exhaustiveness of
switchexpression - spec: no formal commitment to only evaluate once
IDE
- Completion for nested members and patterns
- Test completion with two possible bindings (see
CompletionOnListPattern_FirstNestedand test above)
- Test completion with two possible bindings (see
- QuickInfo/GoToDef
- FindAllReferences on nested members
- Add one highlight or rename test (see
RenameExtendedProperty)
- Add one highlight or rename test (see
- formatting
- Add an indentation test (see
ExtendedPropertyPattern_BeforeandExtendedPropertyPattern_After)
- Add an indentation test (see
- TypeInferrer (see
TestEnumInPatterns_SwitchStatement_ExtendedPropertyPattern) - GenerateVariable (see
TestPropertyPatternInCasePattern2) - Add test for
{ A.B: MissingConstant$$ }(seeTestConstantPatternInExtendedPropertyPattern) - Offer to collapse pattern (
is { P1: { P2: ... } }=>is { P1.P2: ... }) (issue Offer to refactor into extended property pattern #55545)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done Umbrellas