Skip to content

SA1012 incorrectly reported on opening brace in property pattern nested in C# 11 list pattern #3509

@jnm2

Description

@jnm2

Same setup as #3503.

// ⚠ SA1012 Opening brace should be preceded by a space
//                    ↓
if (new[] { "a" } is [{ Length: 1 }])
{
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions