dotnet / dotnet/roslyn

Brace matching is broken (possible with nested and/or target-type and/or collection literal expressions)

Open
#85,567 0 comments 0 reactions 0 assignees View on GitHub
Area-External Area-Razor
Dominant language
C#
Stars
20.7k
Forks
4.3k
PR merge metrics
PR metrics pending

Description

VS: 17.12 P3, no extensions enabled, code compiles successfully

https://github.com/user-attachments/assets/2a1ab429-cff5-4341-a90d-80dc152f0b27

```cs
ViewsChart = [
new(
[
new("Views", [
new(new(2024, 04, 05), 10),
new(new(2024, 04, 06), 13),
new(new(2024, 04, 07), 14)
])
],
Grouping.Day
)
];
```

It works correctly in C# (same component, extracted to code-behind):

https://github.com/user-attachments/assets/25f5b226-b38f-45a5-9e11-4624d435e388

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.