Test plan for "recursive patterns" #25935
Labels
Area-Compilers
Feature - Pattern Matching
Pattern Matching
Test
Test failures in roslyn-CI
Test-Gap
Describes a specific feature or scenario that does not have test coverage
Milestone
This is a place to collect test ideas for the v2 patterns work.
Championed issue: dotnet/csharplang#45
Open LDM issues: dotnet/csharplang#2095
Before Initial Merge
csharplang
.ErrorCode.ERR_ExpressionTreeContainsSwitchExpression
]After initial merge
Deconstruct
method (likeGetDeconstructionInfo
). Are any conversions involved in a positional pattern? [SeeSymbolInfoForPositionalSubpattern
. There are no conversions involved.]Deconstruct
and properties used in switch statement are idempotent/pure, the compiler tests should capture the actual evaluation order (to avoid inadvertent changes) [SeeRecordOrderOfEvaluation
](dynamic)someITupleInstance
[SeeITupleFromDynamic
]Missing tests (not exhaustive):
Would like tests that ensure code coverage for
IDE scenarios:
is { }
? (is there a space?)is Point(1, 2)
) (issue Patterns: Formatting should not insert space between Type and positional sub-pattern #31975)e ? x : y
toe switch { true: x, false: y}
(so that you can then makee
anenum
instead of abool
System.Array
->array
ine is (System.Array $$
ande is (_, System.Array $$
is { Prop: 0 }
oris { Prop is 0 }
?BCL:
MatchFailureException
to Core 3 (design https://github.com/dotnet/corefx/issues/33284)MatchFailureException
to monoFrom the meeting:
await
await e switch { ... }
e switch { pat => await ... }
op e switch { }
is {}
spacing in the formatterThe text was updated successfully, but these errors were encountered: