6d2e6f9452
Addresses https://github.com/dart-lang/sdk/issues/51554#issuecomment-1466946211 Closes #51391 TEST=existing Change-Id: Idec105dcfde4a91d0a21a1907777d6c07e5f01b2 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289224 Commit-Queue: Johnni Winther <johnniwinther@google.com> Reviewed-by: Chloe Stefantsova <cstefantsova@google.com> Reviewed-by: Alexander Markov <alexmarkov@google.com>
17 lines
418 B
Dart
17 lines
418 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(o) {
|
|
switch (o) {
|
|
case [var /*
|
|
joinedIntermediate,
|
|
name=a
|
|
*/a] when a > 5:
|
|
case [_, var /*
|
|
joinedIntermediate,
|
|
name=a
|
|
*/a] when a < 5:
|
|
print(a);
|
|
}
|
|
} |