ListPatterns.cs is the Assert.Ignore'd desired-output spec for #829:
array, List<T>, string, Span/ReadOnlySpan, and custom countable/
sliceable targets; discard, var, typed, and whole-array slice captures;
relational/or/property/type-pattern elements; nested list patterns;
combination with property patterns and or-patterns of list patterns;
a list pattern nested inside a property pattern; generic arrays; list
patterns in switch-expression arms (exhaustive and non-exhaustive) and
switch-statement cases. All four Roslyn 4.14/latest debug/opt configs
compile the fixture and fail only at the output comparison.
ListPatternsLowered.cs passes today: it pins the current lowered
decompilation (raw Length/Count checks plus indexer accesses, and
GetSubArray-backed Range indexing for slice captures) for one case per
target family, via EXPECTED_OUTPUT/OPT splits, so regressions in the
lowered output are caught before list-pattern support lands.
Defects observed while probing: a non-exhaustive switch expression
decompiles to a call to the <PrivateImplementationDetails> throw helper
ThrowSwitchExpressionException, which is not compilable C#; array slice
captures print as a[new Index(1)..^0] instead of a[1..] (Index/Range
sugar gap, related to #2540).
Assisted-by: Claude:claude-fable-5:Claude Code