Skip to content

boolean literals in when clause of switch statement #321

@sharpchen

Description

@sharpchen

Details

What editor are you seeing the problem in? (e.g. Atom, Visual Studio Code, etc.)
vscode
What version of the editor are you using?
1.88.1
What color theme are you using?
darkplus

Repro

_ = (1, '2', "3") switch
{
    (var a, 'b', _) when a > 0 == true => 1,
    (object, _, string s) when s.Length > 2 == false => 2,
    var _ when false => 3,
    var _ when true => 4,
};

code

Please provide a code example and (optionally) a screenshot demonstrating the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions