c4368b3cd7
This a LocalStack extension type for using a list as a typed stack and uses this for local scopes in the body builder, instead of passing the local scopes through the listener stack. This also removes the need for LocalScope.parent TEST=existing Change-Id: I536c63258e4196a1582e9a1d73489adcfdaa6698 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/376400 Commit-Queue: Johnni Winther <johnniwinther@google.com> Reviewed-by: Alexander Markov <alexmarkov@google.com> Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
14 lines
368 B
Dart
14 lines
368 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.
|
|
|
|
main() {
|
|
int i = 0;
|
|
OUTER:
|
|
while (i++ < 10) {
|
|
if (i < 5) continue OUTER;
|
|
break OUTER;
|
|
}
|
|
if (i != 5) throw 'Expected 5, actual $i';
|
|
}
|