Fix missing parens around object in MemberExpression (#424)
This commit is contained in:
1 parent
b13124bed4
commit
895709b4ca
4 files changed
+7
-1
No files matched your search
@@ -46,9 +46,11 @@ var z = Object(123);
|
||||
exports[`test expression.js 1`] = `
|
||||
"() => ({}\`\`);
|
||||
({})\`\`;
|
||||
a = () => ({}).x;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
(() => ({})\`\`);
|
||||
({})\`\`;
|
||||
a = () => ({}).x;
|
||||
"
|
||||
`;
|
||||
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
() => ({}``);
|
||||
({})``;
|
||||
a = () => ({}).x;
|
||||
@@ -2565,7 +2565,7 @@ let tests = [
|
||||
if (x.kind === null.toString()) {
|
||||
}
|
||||
// error, method on null
|
||||
if ({ kind: 1 }.kind === null.toString()) {
|
||||
if (({ kind: 1 }).kind === null.toString()) {
|
||||
} // error, method on null
|
||||
},
|
||||
// non-objects on LHS
|
||||
|
||||
Reference in new issue
Block a user