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

Unified Diff: test/mjsunit/regress/regress-5896.js

Issue 2672313003: [async await] fix async await desugaring
Patch Set: fmt Created 3 years, 10 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 | « src/parsing/preparser.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-5896.js
diff --git a/test/mjsunit/regress/regress-5896.js b/test/mjsunit/regress/regress-5896.js
new file mode 100644
index 0000000000000000000000000000000000000000..e1145d2a8c8e9a82de8bdfd5b1e3ec69171a3888
--- /dev/null
+++ b/test/mjsunit/regress/regress-5896.js
@@ -0,0 +1,17 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Flags: --allow-natives-syntax
+
+async function foo() {
+ try {
+ return 1;
+ } finally {
+ return Promise.resolve().then(() => { return 2; });
+ }
+}
+
+foo()
+ .then(value => { found = value; assertEquals(2, value) })
+ .catch((e) => { %AbortJS(''+e); });
« no previous file with comments | « src/parsing/preparser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698