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

Unified Diff: test/mjsunit/es8/syntactic-tail-call-parsing.js

Issue 2278413003: Disallow tail calls from async functions and generators (Closed)
Patch Set: Adding test suggested by neis Created 4 years, 4 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 | « test/message/syntactic-tail-call-generator.out ('k') | test/mjsunit/regress/regress-639270.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es8/syntactic-tail-call-parsing.js
diff --git a/test/mjsunit/es8/syntactic-tail-call-parsing.js b/test/mjsunit/es8/syntactic-tail-call-parsing.js
index 9ceff9c59649ba1bfa451e9743f8a8e9d0381ef7..486c3e1da6e29a62e94cbd20e8230a9b09111f4f 100644
--- a/test/mjsunit/es8/syntactic-tail-call-parsing.js
+++ b/test/mjsunit/es8/syntactic-tail-call-parsing.js
@@ -3,7 +3,7 @@
// found in the LICENSE file.
// Flags: --allow-natives-syntax --harmony-explicit-tailcalls
-// Flags: --harmony-do-expressions
+// Flags: --harmony-do-expressions --harmony-async-await
"use strict";
var SyntaxErrorTests = [
@@ -128,7 +128,10 @@ var SyntaxErrorTests = [
err: ` ^^^^^^^^^^^^^^`,
},
{ src: `()=>{ function* G() { yield continue foo(); } }`,
- err: ` ^^^^^^^^^^^^^^`,
+ err: ` ^^^^^`,
+ },
+ { src: `()=>{ function* G() { return continue foo(); } }`,
+ err: ` ^^^^^`,
},
{ src: `()=>{ (1, 2, 3, continue f() ) => {} }`,
err: ` ^^^^^^^^^^^^`,
@@ -235,6 +238,9 @@ var SyntaxErrorTests = [
{ src: `class A extends continue f () {}; }`,
err: ` ^^^^^^^^^^^^^`,
},
+ { src: `async() => continue foo()`,
+ err: ` ^^^^^`,
+ },
],
},
{ msg: "Tail call expression in try block",
@@ -311,7 +317,6 @@ var NoErrorTests = [
`()=>{ return a || continue f() ; }`,
`()=>{ return a && continue f() ; }`,
`()=>{ return a , continue f() ; }`,
- `()=>{ function* G() { return continue foo(); } }`,
`()=>{ class A { foo() { return continue super.f() ; } } }`,
`()=>{ function B() { return continue new.target() ; } }`,
`()=>{ return continue do { x ? foo() : bar() ; }() }`,
« no previous file with comments | « test/message/syntactic-tail-call-generator.out ('k') | test/mjsunit/regress/regress-639270.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698