f583a2bf73
The parser wrongly flagged any `const (...)` in a constant pattern context and not just the intended `const ()`. Closes #51415 Change-Id: Id7b0621cda4a144ac186dea55dbcbeaf041349bf Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283602 Reviewed-by: Chloe Stefantsova <cstefantsova@google.com> Commit-Queue: Johnni Winther <johnniwinther@google.com>
5 lines
210 B
Dart
5 lines
210 B
Dart
void foo() {
|
|
if (obj case (longFieldName: const (first: 1, second: 2))) {;}
|
|
if (obj case const (element, element, element, element)) {;}
|
|
if (obj case Foo(longFieldName: const (first: 1, second: 2))) {;}
|
|
} |