47dc4663d8
Increase test coverage --- body_builder.dart was the target. Process: Replaced all `coverage-ignore-block(suite):` comments with throws and ran `python3 tools/test.py -n cfe-strong-linux language/`, copying (and modifying) representative tests from `langauge` that covered new stuff (i.e. threw in the modified version). Then undid the throw changes, and redid the coverage marking. Change-Id: Ie08dc6fcd70cd3722b68c38bf2a152d03aae7885 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/378705 Commit-Queue: Jens Johansen <jensj@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com>
19 lines
486 B
Dart
19 lines
486 B
Dart
// Copyright (c) 2024, 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.
|
|
|
|
// Based on tests/language/switch/switch3_test.dart
|
|
|
|
/// Check that 'continue' to switch statement is illegal.
|
|
|
|
void foo() {
|
|
var a = 5;
|
|
var x;
|
|
bar: switch (a) {
|
|
case 1: x = 1; break;
|
|
case 6: x = 2; continue; // Error
|
|
case 8: break;
|
|
}
|
|
return a;
|
|
}
|