Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Unified Diff: tests/language/regress_23498_test.dart

Issue 1160663004: Fix restoring of async try context in catch clause (issue 23498). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/parser.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/regress_23498_test.dart
diff --git a/tests/language/regress_22579_test.dart b/tests/language/regress_23498_test.dart
similarity index 69%
copy from tests/language/regress_22579_test.dart
copy to tests/language/regress_23498_test.dart
index 76c8f42463fe87b21372d1f2da3a768cf0482fb6..ba7a1406d337b5611ea7076fe67760b87009909e 100644
--- a/tests/language/regress_22579_test.dart
+++ b/tests/language/regress_23498_test.dart
@@ -7,10 +7,16 @@ import "package:expect/expect.dart";
foo() async {
try {
- await 1;
- } catch(e) {
+ try {
+ await new Future.error('error');
+ } catch (error) {
+ print("caught once");
+ throw 'error';
+ }
+ } catch (error) {
+ print("caught twice");
+ throw 'error';
}
- throw "error";
}
main() async {
« no previous file with comments | « runtime/vm/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698