Skip to content

C#: Data flow for positional patterns. - #22689

Draft
michaelnebel wants to merge 12 commits into
github:mainfrom
michaelnebel:csharp/positionalpatternflow
Draft

michaelnebel wants to merge 12 commits into
github:mainfrom
michaelnebel:csharp/positionalpatternflow

Conversation

@michaelnebel

@michaelnebel michaelnebel commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

In this PR we add data flow support via positional patterns. That is,

var x = (1, (2, 3), 4);
switch (x)
{
    case (var a1, (var b1, var c1), _):
        Sink(a1);        // has value flow 1
        Sink(c1);        // has value flow 3
        Sink(b1);       // has value flow 2.
        break;
}

Note, that positional patterns are similar to tuple patterns (var (x, y)), but they haven't been handled in the data flow library before now.

@michaelnebel michaelnebel changed the title Csharp/positionalpatternflow C#: Data flow for positional patterns. Sep 29, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant