| Index: pkg/front_end/lib/src/fasta/scope.dart
|
| diff --git a/pkg/front_end/lib/src/fasta/scope.dart b/pkg/front_end/lib/src/fasta/scope.dart
|
| index 4f3537c93ef7d304ac4e8a5b45ea83e528d4d299..c1b884cb0225388dd854264c7585cc3cdf207aad 100644
|
| --- a/pkg/front_end/lib/src/fasta/scope.dart
|
| +++ b/pkg/front_end/lib/src/fasta/scope.dart
|
| @@ -46,6 +46,17 @@ class Scope {
|
| return new Scope.nested(this, isModifiable: isModifiable);
|
| }
|
|
|
| + /// Create a special scope for use by labeled staments. This scope doesn't
|
| + /// introduce a new scope for local variables, only for labels. This deals
|
| + /// with corner cases like this:
|
| + ///
|
| + /// L: var x;
|
| + /// x = 42;
|
| + /// print("The answer is $x.");
|
| + Scope createNestedLabelScope() {
|
| + return new Scope(local, setters, parent, isModifiable: true);
|
| + }
|
| +
|
| Builder lookup(String name, int charOffset, Uri fileUri,
|
| {bool isInstanceScope: true}) {
|
| Builder builder = local[name];
|
|
|