b69a1f60ba
No changes made to this block. Bug: Change-Id: I4e627bdf2f407894bd1f6ae3353e24709f9c8f70 Reviewed-on: https://dart-review.googlesource.com/8100 Reviewed-by: Phil Quitslund <pquitslund@google.com> Reviewed-by: Erik Ernst <eernst@google.com>
29 lines
604 B
Dart
29 lines
604 B
Dart
// Copyright (c) 2013, 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.
|
|
|
|
// Regression test for dart2js that used to not treat the finally
|
|
// block as a successor of a nested try block.
|
|
|
|
import "package:expect/expect.dart";
|
|
|
|
var a;
|
|
|
|
foo() {
|
|
var b = a == 8; // This should not be GVN'ed.
|
|
while (!b) {
|
|
try {
|
|
try {} finally {
|
|
a = 8;
|
|
break;
|
|
}
|
|
} finally {
|
|
return a == 8;
|
|
}
|
|
}
|
|
}
|
|
|
|
main() {
|
|
Expect.isTrue(foo());
|
|
}
|