b5c4b6f3d7
Closes #50985 Change-Id: I04e407414eb6dafe6451f2bb37653670cbbc2466 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278905 Reviewed-by: Jens Johansen <jensj@google.com> Commit-Queue: Johnni Winther <johnniwinther@google.com>
14 lines
386 B
Dart
14 lines
386 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.
|
|
|
|
String test1(List list) {
|
|
return switch (list) {
|
|
<int>[1, 2, 3, 4, ... var r1] => r1.toString(),
|
|
_ => "default"
|
|
};
|
|
}
|
|
|
|
main() {
|
|
test1([1, 2, 3, 4, 5, 6]);
|
|
} |