swc/crates/swc_ecma_parser/tests/tsc/enumMergingErrors.json

1143 lines
29 KiB
JSON

{
"type": "Script",
"span": {
"start": 105,
"end": 875,
"ctxt": 0
},
"body": [
{
"type": "TsModuleDeclaration",
"span": {
"start": 105,
"end": 200,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 112,
"end": 113,
"ctxt": 0
},
"value": "M",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 114,
"end": 200,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 120,
"end": 144,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 127,
"end": 144,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 132,
"end": 134,
"ctxt": 0
},
"value": "E1",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 137,
"end": 142,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 137,
"end": 138,
"ctxt": 0
},
"value": "A",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 141,
"end": 142,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 149,
"end": 169,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 156,
"end": 169,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 161,
"end": 163,
"ctxt": 0
},
"value": "E2",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 166,
"end": 167,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 166,
"end": 167,
"ctxt": 0
},
"value": "C",
"optional": false
},
"init": null
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 174,
"end": 198,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 181,
"end": 198,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 186,
"end": 188,
"ctxt": 0
},
"value": "E3",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 191,
"end": 196,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 191,
"end": 192,
"ctxt": 0
},
"value": "A",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 195,
"end": 196,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
]
}
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 201,
"end": 318,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 208,
"end": 209,
"ctxt": 0
},
"value": "M",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 210,
"end": 318,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 216,
"end": 251,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 223,
"end": 251,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 228,
"end": 230,
"ctxt": 0
},
"value": "E1",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 233,
"end": 249,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 233,
"end": 234,
"ctxt": 0
},
"value": "B",
"optional": false
},
"init": {
"type": "MemberExpression",
"span": {
"start": 237,
"end": 249,
"ctxt": 0
},
"object": {
"type": "StringLiteral",
"span": {
"start": 237,
"end": 242,
"ctxt": 0
},
"value": "foo",
"raw": "'foo'"
},
"property": {
"type": "Identifier",
"span": {
"start": 243,
"end": 249,
"ctxt": 0
},
"value": "length",
"optional": false
}
}
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 256,
"end": 291,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 263,
"end": 291,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 268,
"end": 270,
"ctxt": 0
},
"value": "E2",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 273,
"end": 289,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 273,
"end": 274,
"ctxt": 0
},
"value": "B",
"optional": false
},
"init": {
"type": "MemberExpression",
"span": {
"start": 277,
"end": 289,
"ctxt": 0
},
"object": {
"type": "StringLiteral",
"span": {
"start": 277,
"end": 282,
"ctxt": 0
},
"value": "foo",
"raw": "'foo'"
},
"property": {
"type": "Identifier",
"span": {
"start": 283,
"end": 289,
"ctxt": 0
},
"value": "length",
"optional": false
}
}
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 296,
"end": 316,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 303,
"end": 316,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 308,
"end": 310,
"ctxt": 0
},
"value": "E3",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 313,
"end": 314,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 313,
"end": 314,
"ctxt": 0
},
"value": "C",
"optional": false
},
"init": null
}
]
}
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 319,
"end": 425,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 326,
"end": 327,
"ctxt": 0
},
"value": "M",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 328,
"end": 425,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 334,
"end": 354,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 341,
"end": 354,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 346,
"end": 348,
"ctxt": 0
},
"value": "E1",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 351,
"end": 352,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 351,
"end": 352,
"ctxt": 0
},
"value": "C",
"optional": false
},
"init": null
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 359,
"end": 383,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 366,
"end": 383,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 371,
"end": 373,
"ctxt": 0
},
"value": "E2",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 376,
"end": 381,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 376,
"end": 377,
"ctxt": 0
},
"value": "A",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 380,
"end": 381,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 388,
"end": 423,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 395,
"end": 423,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 400,
"end": 402,
"ctxt": 0
},
"value": "E3",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 405,
"end": 421,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 405,
"end": 406,
"ctxt": 0
},
"value": "B",
"optional": false
},
"init": {
"type": "MemberExpression",
"span": {
"start": 409,
"end": 421,
"ctxt": 0
},
"object": {
"type": "StringLiteral",
"span": {
"start": 409,
"end": 414,
"ctxt": 0
},
"value": "foo",
"raw": "'foo'"
},
"property": {
"type": "Identifier",
"span": {
"start": 415,
"end": 421,
"ctxt": 0
},
"value": "length",
"optional": false
}
}
}
]
}
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 525,
"end": 567,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 532,
"end": 534,
"ctxt": 0
},
"value": "M1",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 535,
"end": 567,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 541,
"end": 565,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 548,
"end": 565,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 553,
"end": 555,
"ctxt": 0
},
"value": "E1",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 558,
"end": 563,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 558,
"end": 559,
"ctxt": 0
},
"value": "A",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 562,
"end": 563,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
]
}
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 568,
"end": 606,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 575,
"end": 577,
"ctxt": 0
},
"value": "M1",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 578,
"end": 606,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 584,
"end": 604,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 591,
"end": 604,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 596,
"end": 598,
"ctxt": 0
},
"value": "E1",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 601,
"end": 602,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 601,
"end": 602,
"ctxt": 0
},
"value": "B",
"optional": false
},
"init": null
}
]
}
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 607,
"end": 645,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 614,
"end": 616,
"ctxt": 0
},
"value": "M1",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 617,
"end": 645,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 623,
"end": 643,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 630,
"end": 643,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 635,
"end": 637,
"ctxt": 0
},
"value": "E1",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 640,
"end": 641,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 640,
"end": 641,
"ctxt": 0
},
"value": "C",
"optional": false
},
"init": null
}
]
}
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 755,
"end": 793,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 762,
"end": 764,
"ctxt": 0
},
"value": "M2",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 765,
"end": 793,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 771,
"end": 791,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 778,
"end": 791,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 783,
"end": 785,
"ctxt": 0
},
"value": "E1",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 788,
"end": 789,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 788,
"end": 789,
"ctxt": 0
},
"value": "A",
"optional": false
},
"init": null
}
]
}
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 794,
"end": 836,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 801,
"end": 803,
"ctxt": 0
},
"value": "M2",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 804,
"end": 836,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 810,
"end": 834,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 817,
"end": 834,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 822,
"end": 824,
"ctxt": 0
},
"value": "E1",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 827,
"end": 832,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 827,
"end": 828,
"ctxt": 0
},
"value": "B",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 831,
"end": 832,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
]
}
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 837,
"end": 875,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 844,
"end": 846,
"ctxt": 0
},
"value": "M2",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 847,
"end": 875,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 853,
"end": 873,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 860,
"end": 873,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 865,
"end": 867,
"ctxt": 0
},
"value": "E1",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 870,
"end": 871,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 870,
"end": 871,
"ctxt": 0
},
"value": "C",
"optional": false
},
"init": null
}
]
}
}
]
}
}
],
"interpreter": null
}