---
source: crates/react_hermes_parser/tests/parser_test.rs
expression: "format!(\"Input:\\n{input}\\n\\nOutput:\\n{output}\")"
input_file: crates/react_hermes_parser/tests/fixtures/error.codegen-error-on-conflicting-imports.js
---
Input:
// @enableEmitFreeze @instrumentForget

let makeReadOnly = "conflicting identifier";
function useFoo(props) {
  return foo(props.x);
}


Output:
{
  "type": "Program",
  "body": [
    {
      "type": "VariableDeclaration",
      "kind": "let",
      "declarations": [
        {
          "type": "VariableDeclarator",
          "id": {
            "type": "Identifier",
            "name": "makeReadOnly",
            "typeAnnotation": null,
            "loc": null,
            "range": [
              44,
              56
            ]
          },
          "init": {
            "type": "StringLiteral",
            "value": "conflicting identifier",
            "loc": null,
            "range": [
              59,
              83
            ]
          },
          "loc": null,
          "range": [
            44,
            83
          ]
        }
      ],
      "loc": null,
      "range": [
        40,
        84
      ]
    },
    {
      "type": "FunctionDeclaration",
      "id": {
        "type": "Identifier",
        "name": "useFoo",
        "typeAnnotation": null,
        "loc": null,
        "range": [
          94,
          100
        ]
      },
      "params": [
        {
          "type": "Identifier",
          "name": "props",
          "typeAnnotation": null,
          "loc": null,
          "range": [
            101,
            106
          ]
        }
      ],
      "body": {
        "type": "BlockStatement",
        "body": [
          {
            "type": "ReturnStatement",
            "argument": {
              "type": "CallExpression",
              "callee": {
                "type": "Identifier",
                "name": "foo",
                "typeAnnotation": null,
                "loc": null,
                "range": [
                  119,
                  122
                ]
              },
              "arguments": [
                {
                  "type": "MemberExpression",
                  "object": {
                    "type": "Identifier",
                    "name": "props",
                    "typeAnnotation": null,
                    "loc": null,
                    "range": [
                      123,
                      128
                    ]
                  },
                  "property": {
                    "type": "Identifier",
                    "name": "x",
                    "typeAnnotation": null,
                    "loc": null,
                    "range": [
                      129,
                      130
                    ]
                  },
                  "computed": false,
                  "loc": null,
                  "range": [
                    123,
                    130
                  ]
                }
              ],
              "loc": null,
              "range": [
                119,
                131
              ]
            },
            "loc": null,
            "range": [
              112,
              132
            ]
          }
        ],
        "loc": null,
        "range": [
          108,
          134
        ]
      },
      "generator": false,
      "async": false,
      "loc": null,
      "range": [
        85,
        134
      ],
      "loc": null,
      "range": [
        85,
        134
      ]
    }
  ],
  "sourceType": "script",
  "loc": null,
  "range": [
    40,
    134
  ]
}
