dart-sdk/tests/language/regress_22858_test.dart
regis@google.com 3783f349dc Be less aggressive in sharing contexts between scopes so that sibling contexts
cannot appear in nested node sequences (issue 22858), since this case cannot
be handled by the graph builder.
Add assert to graph builder to detect such occurences (uncovered async* bug).
Fix an async* issue where a scope was mistakenly reused.
Improve ast printing for node sequences.
Add regression test.

R=hausner@google.com, srdjan@google.com

Review URL: https://codereview.chromium.org//1020893004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44592 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-19 22:39:46 +00:00

26 lines
505 B
Dart

// Copyright (c) 2015, 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.
import 'package:expect/expect.dart';
main() {
var good = "good";
f1() {
{
var bad = "bad";
f2() { bad; }
}
Expect.equals("good", good);
do {
Expect.equals("good", good);
int ugly = 0;
f3() { ugly; }
} while (false);
}
f1();
}