[Webkit-unassigned] [Bug 123506] New: JavaScript parser bug
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Oct 30 04:33:47 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=123506
Summary: JavaScript parser bug
Product: WebKit
Version: 528+ (Nightly build)
Platform: Macintosh Intel
URL: https://gist.github.com/mishoo/7230949
OS/Version: Mac OS X 10.8
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: JavaScriptCore
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: mihai.bazon at gmail.com
// fails with SyntaxError: Expected token ')'
( function(){ return this || eval('this'); }().x = "y" );
// fails with SyntaxError: Unexpected token '='
1, function(){ return this || eval('this'); }().x = "y";
//// weird that we get different error messages
//// The following all work.
// place the function call inside parens
( (function(){ return this || eval('this'); }()).x = "y" );
1, (function(){ return this || eval('this'); }()).x = "y";
// simplify the return expression, keep `then`
( function(){ return this; }().x = "y" );
1, function(){ return this; }().x = "y";
// keep `eval`
( function(){ return eval('this'); }().x = "y" );
1, function(){ return eval('this'); }().x = "y";
// place the return expression inside parens (!!)
( function(){ return ( this || eval('this') ); }().x = "y" );
1, function(){ return ( this || eval('this') ); }().x = "y";
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list