dotnet / dotnet/csharpstandard

Check semantics of nested contexts in patterns in v9

Open
#1,648 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
815
Forks
99
Avg merge
1d 14h
Merged PRs (30d)
16

Description

> In nested contexts, the *sub-pattern* is tested against values retrieved from properties, fields, or indexed from other input values, depending on the pattern form.

When we get to C# 9 with parenthesized patterns and logical patterns, we might want to remember to come back if we don't generalize this statement now, since `and` takes two subpatterns that do not retrieve new values to test against.

_Originally posted by @jnm2 in https://github.com/dotnet/csharpstandard/pull/873#discussion_r2240943150_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.