mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 433529: Part 7 - Name functions whose field in an object literal is a PNK_STRING node. r=jimb
This commit is contained in:
parent
f6fd736dd3
commit
acc10ae0ea
@ -192,10 +192,14 @@ class NameResolver
|
||||
ParseNode *node = toName[pos];
|
||||
|
||||
if (node->isKind(PNK_COLON)) {
|
||||
if (!node->pn_left->isKind(PNK_NAME))
|
||||
continue;
|
||||
/* special atoms are skipped, but others are dot-appended */
|
||||
if (!special(node->pn_left->pn_atom)) {
|
||||
if (node->pn_left->isKind(PNK_NAME)) {
|
||||
/* special atoms are skipped, but others are dot-appended */
|
||||
if (!special(node->pn_left->pn_atom)) {
|
||||
if (!buf.append(".") || !buf.append(node->pn_left->pn_atom))
|
||||
return NULL;
|
||||
}
|
||||
} else if (node->pn_left->isKind(PNK_STRING)) {
|
||||
/* If a string is explicitly specified, don't see if its special */
|
||||
if (!buf.append(".") || !buf.append(node->pn_left->pn_atom))
|
||||
return NULL;
|
||||
}
|
||||
|
@ -114,3 +114,6 @@ function f(g) {
|
||||
}
|
||||
var x = f(function () { return function() {}; });
|
||||
assertName(x, 'x</<');
|
||||
|
||||
var a = {'b': function(){}};
|
||||
assertName(a.b, 'a.b');
|
||||
|
Loading…
Reference in New Issue
Block a user