31e119e594
This reports the error on empty map pattern and moves the reporting of rest patterns in map patterns to the shared analysis. Change-Id: I317d0c42a3bc7534462b1b9781c1f6471746fc0f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292860 Reviewed-by: Johnni Winther <johnniwinther@google.com> Reviewed-by: Chloe Stefantsova <cstefantsova@google.com> Commit-Queue: Johnni Winther <johnniwinther@google.com>
9 lines
283 B
Dart
9 lines
283 B
Dart
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
method(Map m) => switch (m) {
|
|
{} => 0,
|
|
_ => 1,
|
|
};
|