Er, back out everything, guess my understanding of orange was...lacking

This commit is contained in:
Jeff Walden 2010-04-20 13:48:46 -07:00
parent 1250c87f26
commit e31b34b946
3 changed files with 1 additions and 52 deletions

View File

@ -7993,7 +7993,7 @@ Parser::primaryExpr(TokenKind tt, JSBool afterDot)
/* We have to fake a 'function' token here. */
tokenStream.mungeCurrentToken(TOK_FUNCTION, JSOP_NOP);
pn2 = functionDef(JSFUN_LAMBDA, false);
pn2 = functionExpr();
pn2 = JSParseNode::newBinaryOrAppend(TOK_COLON, op, pn3, pn2, tc);
goto skip;
}

View File

@ -1,3 +1,2 @@
url-prefix ../../jsreftest.html?test=ecma_5/Expressions/
script 11.1.5-01.js
script named-accessor-function.js

View File

@ -1,50 +0,0 @@
// Any copyright is dedicated to the Public Domain.
// http://creativecommons.org/licenses/publicdomain/
// Contributor:
// Jeff Walden <jwalden+code@mit.edu>
var gTestfile = 'named-accessor-function.js';
//-----------------------------------------------------------------------------
var BUGNUMBER = 999999;
var summary = '{ get x y() { } } is not valid getter syntax';
print(BUGNUMBER + ": " + summary);
var BAD_CODE = ["({ get x y() { } })", "({ set x y(v) { } })"];
for (var i = 0, sz = BAD_CODE.length; i < sz; i++)
{
var code = BAD_CODE[i];
var err = "no exception";
try
{
eval(code);
}
catch (e)
{
err = e;
}
if (!(err instanceof SyntaxError))
{
assertEq(true, false,
"bad or no exception thrown for eval(" + code + "): " + err);
}
err = "no exception";
try
{
new Function(code);
}
catch (e)
{
err = e;
}
if (!(err instanceof SyntaxError))
{
assertEq(true, false,
"bad or no exception thrown for Function(" + code + "): " + err);
}
}
reportCompare(true, true);