b0c705e4bd
We need to prohibit function expressions during guard clauses in switch expressions, otherwise the `=>` might be misinterpreted. Fixes #50591. Bug: https://github.com/dart-lang/sdk/issues/50591, https://github.com/dart-lang/language/issues/2672 Change-Id: Ie5703ac7049557798b19778281429e8a591cf09f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273020 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Paul Berry <paulberry@google.com>
2 lines
53 B
Dart
2 lines
53 B
Dart
f(x) => switch(x) { _ when switch(x) {} + () => 0 };
|