swc/crates/swc_ecma_parser/tests/tsc/enumMergingErrors.json
2022-03-22 07:54:08 +00:00

1138 lines
29 KiB
JSON

{
"type": "Script",
"span": {
"start": 104,
"end": 874,
"ctxt": 0
},
"body": [
{
"type": "TsModuleDeclaration",
"span": {
"start": 104,
"end": 199,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 111,
"end": 112,
"ctxt": 0
},
"value": "M",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 113,
"end": 199,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 119,
"end": 143,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 126,
"end": 143,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 131,
"end": 133,
"ctxt": 0
},
"value": "E1",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 136,
"end": 141,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 136,
"end": 137,
"ctxt": 0
},
"value": "A",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 140,
"end": 141,
"ctxt": 0
},
"value": 0.0
}
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 148,
"end": 168,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 155,
"end": 168,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 160,
"end": 162,
"ctxt": 0
},
"value": "E2",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 165,
"end": 166,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 165,
"end": 166,
"ctxt": 0
},
"value": "C",
"optional": false
},
"init": null
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 173,
"end": 197,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 180,
"end": 197,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 185,
"end": 187,
"ctxt": 0
},
"value": "E3",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 190,
"end": 195,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 190,
"end": 191,
"ctxt": 0
},
"value": "A",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 194,
"end": 195,
"ctxt": 0
},
"value": 0.0
}
}
]
}
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 200,
"end": 317,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 207,
"end": 208,
"ctxt": 0
},
"value": "M",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 209,
"end": 317,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 215,
"end": 250,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 222,
"end": 250,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 227,
"end": 229,
"ctxt": 0
},
"value": "E1",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 232,
"end": 248,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 232,
"end": 233,
"ctxt": 0
},
"value": "B",
"optional": false
},
"init": {
"type": "MemberExpression",
"span": {
"start": 236,
"end": 248,
"ctxt": 0
},
"object": {
"type": "StringLiteral",
"span": {
"start": 236,
"end": 241,
"ctxt": 0
},
"value": "foo",
"raw": "'foo'"
},
"property": {
"type": "Identifier",
"span": {
"start": 242,
"end": 248,
"ctxt": 0
},
"value": "length",
"optional": false
}
}
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 255,
"end": 290,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 262,
"end": 290,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 267,
"end": 269,
"ctxt": 0
},
"value": "E2",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 272,
"end": 288,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 272,
"end": 273,
"ctxt": 0
},
"value": "B",
"optional": false
},
"init": {
"type": "MemberExpression",
"span": {
"start": 276,
"end": 288,
"ctxt": 0
},
"object": {
"type": "StringLiteral",
"span": {
"start": 276,
"end": 281,
"ctxt": 0
},
"value": "foo",
"raw": "'foo'"
},
"property": {
"type": "Identifier",
"span": {
"start": 282,
"end": 288,
"ctxt": 0
},
"value": "length",
"optional": false
}
}
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 295,
"end": 315,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 302,
"end": 315,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 307,
"end": 309,
"ctxt": 0
},
"value": "E3",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 312,
"end": 313,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 312,
"end": 313,
"ctxt": 0
},
"value": "C",
"optional": false
},
"init": null
}
]
}
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 318,
"end": 424,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 325,
"end": 326,
"ctxt": 0
},
"value": "M",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 327,
"end": 424,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 333,
"end": 353,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 340,
"end": 353,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 345,
"end": 347,
"ctxt": 0
},
"value": "E1",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 350,
"end": 351,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 350,
"end": 351,
"ctxt": 0
},
"value": "C",
"optional": false
},
"init": null
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 358,
"end": 382,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 365,
"end": 382,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 370,
"end": 372,
"ctxt": 0
},
"value": "E2",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 375,
"end": 380,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 375,
"end": 376,
"ctxt": 0
},
"value": "A",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 379,
"end": 380,
"ctxt": 0
},
"value": 0.0
}
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 387,
"end": 422,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 394,
"end": 422,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 399,
"end": 401,
"ctxt": 0
},
"value": "E3",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 404,
"end": 420,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 404,
"end": 405,
"ctxt": 0
},
"value": "B",
"optional": false
},
"init": {
"type": "MemberExpression",
"span": {
"start": 408,
"end": 420,
"ctxt": 0
},
"object": {
"type": "StringLiteral",
"span": {
"start": 408,
"end": 413,
"ctxt": 0
},
"value": "foo",
"raw": "'foo'"
},
"property": {
"type": "Identifier",
"span": {
"start": 414,
"end": 420,
"ctxt": 0
},
"value": "length",
"optional": false
}
}
}
]
}
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 524,
"end": 566,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 531,
"end": 533,
"ctxt": 0
},
"value": "M1",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 534,
"end": 566,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 540,
"end": 564,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 547,
"end": 564,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 552,
"end": 554,
"ctxt": 0
},
"value": "E1",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 557,
"end": 562,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 557,
"end": 558,
"ctxt": 0
},
"value": "A",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 561,
"end": 562,
"ctxt": 0
},
"value": 0.0
}
}
]
}
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 567,
"end": 605,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 574,
"end": 576,
"ctxt": 0
},
"value": "M1",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 577,
"end": 605,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 583,
"end": 603,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 590,
"end": 603,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 595,
"end": 597,
"ctxt": 0
},
"value": "E1",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 600,
"end": 601,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 600,
"end": 601,
"ctxt": 0
},
"value": "B",
"optional": false
},
"init": null
}
]
}
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 606,
"end": 644,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 613,
"end": 615,
"ctxt": 0
},
"value": "M1",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 616,
"end": 644,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 622,
"end": 642,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 629,
"end": 642,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 634,
"end": 636,
"ctxt": 0
},
"value": "E1",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 639,
"end": 640,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 639,
"end": 640,
"ctxt": 0
},
"value": "C",
"optional": false
},
"init": null
}
]
}
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 754,
"end": 792,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 761,
"end": 763,
"ctxt": 0
},
"value": "M2",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 764,
"end": 792,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 770,
"end": 790,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 777,
"end": 790,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 782,
"end": 784,
"ctxt": 0
},
"value": "E1",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 787,
"end": 788,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 787,
"end": 788,
"ctxt": 0
},
"value": "A",
"optional": false
},
"init": null
}
]
}
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 793,
"end": 835,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 800,
"end": 802,
"ctxt": 0
},
"value": "M2",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 803,
"end": 835,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 809,
"end": 833,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 816,
"end": 833,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 821,
"end": 823,
"ctxt": 0
},
"value": "E1",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 826,
"end": 831,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 826,
"end": 827,
"ctxt": 0
},
"value": "B",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 830,
"end": 831,
"ctxt": 0
},
"value": 0.0
}
}
]
}
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 836,
"end": 874,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 843,
"end": 845,
"ctxt": 0
},
"value": "M2",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 846,
"end": 874,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 852,
"end": 872,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 859,
"end": 872,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 864,
"end": 866,
"ctxt": 0
},
"value": "E1",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 869,
"end": 870,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 869,
"end": 870,
"ctxt": 0
},
"value": "C",
"optional": false
},
"init": null
}
]
}
}
]
}
}
],
"interpreter": null
}