TypeScript/tests/baselines/reference/objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.js
Paul Gschwendtner b26f77a703
Do not incorrectly add line separators for non-synthetic nodes when emitting node list (#44070)
As of 3c32f6e154, a line separator is
added between nodes if the nodes are not synthetic and on separate
lines. This it push s wrong and previously only happened if the non-synthetic
nodes were on different lines but had the same parent.

Fixes #44068.
2021-06-04 09:46:23 -05:00

47 lines
690 B
TypeScript

//// [objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.ts]
// errors
var y = {
"stringLiteral",
42,
get e,
set f,
this,
super,
var,
class,
typeof
};
var x = {
a.b,
a["ss"],
a[1],
};
var v = { class }; // error
//// [objectLiteralShorthandPropertiesErrorFromNotUsingIdentifier.js]
var _a;
// errors
var y = {
"stringLiteral": ,
42: ,
get e() { },
set f() { },
"this": ,
"super": ,
"var": ,
"class": ,
"typeof":
};
var x = (_a = {
a: a,
: .b,
a: a
},
_a["ss"] = ,
_a.a = a,
_a[1] = ,
_a);
var v = { "class": }; // error