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 9c4cbb8c46585079cd33a580513f8b9ae9114f3d..9ceff9c59649ba1bfa451e9743f8a8e9d0381ef7 100644 |
--- a/test/mjsunit/es8/syntactic-tail-call-parsing.js |
+++ b/test/mjsunit/es8/syntactic-tail-call-parsing.js |
@@ -270,6 +270,25 @@ var SyntaxErrorTests = [ |
}, |
], |
}, |
+ { msg: "Tail call of a direct eval is not allowed", |
+ tests: [ |
+ { src: `()=>{ return continue eval(" foo () " ) ; }`, |
+ err: ` ^^^^^^^^^^^^^^^^^`, |
+ }, |
+ { src: `()=>{ return a || continue eval("", 1, 2) ; }`, |
+ err: ` ^^^^^^^^^^^^^^`, |
+ }, |
+ { src: `()=>{ return a, continue eval ( ) ; }`, |
+ err: ` ^^^^^^^^^`, |
+ }, |
+ { src: `()=> a, continue eval ( ) ; `, |
+ err: ` ^^^^^^^^^`, |
+ }, |
+ { src: `()=> a || continue eval (' ' ) ; `, |
+ err: ` ^^^^^^^^^^^^`, |
+ }, |
+ ], |
+ }, |
{ msg: "Undefined label 'foo'", |
tests: [ |
{ src: `()=>{ continue foo () ; }`, |
@@ -285,6 +304,7 @@ var NoErrorTests = [ |
`()=>{ return continue a.b.c.foo () ; }`, |
`()=>{ return continue a().b.c().d.foo () ; }`, |
`()=>{ return continue foo (1)(2)(3, 4) ; }`, |
+ `()=>{ return continue (0, eval)(); }`, |
`()=>{ return ( continue b() ) ; }`, |
"()=>{ return continue bar`ab cd ef` ; }", |
"()=>{ return continue bar`ab ${cd} ef` ; }", |