Skip to content

[Compiler Bug]: TSInstantiationExpression as default value in parameter list #34358

@SimpleCreations

Description

@SimpleCreations

What kind of issue is this?

  • React Compiler core (the JS output is incorrect, or your app works incorrectly after optimization)
  • babel-plugin-react-compiler (build issue installing or using the Babel plugin)
  • eslint-plugin-react-compiler (build issue installing or using the eslint plugin)
  • react-compiler-healthcheck (build issue installing or using the healthcheck script)

Link to repro

https://playground.react.dev/#N4Igzg9grgTgxgUxALhHCA7MAXABAEwQDMBDKAG2wCUENCYB5AB2wEtNcBeXAHgBVcCAB7Za+MLgDSCAJ4A+ABQAdDLlxMYEJmGS4AwhAC2TTLWwAFTdp7YZTBBCK4AygnII42Zm0z85cgBoVAEouOV5Xd09vdlUAa1lOYA0tMAA6ADcScigEAF9cYDTilO0CgHo5AG4VFWETGDx0LDxIjzxufkERMQlpeQVgFTUtHywg1VwYMQRGFliuAmIySho6WZjfPkDh3CychAmRjD0ACxIMAHNDlTzdIcnR2J1cTYw-AG0AXRrJ6fW5mMAPy6BSlF4GYymDAWKxgGx2BxONrReZbfyhTjhGgkTwAUXchjMvzU+1yINwfBJuEwZwu11BZIQuj4mPCGQgrHwvzybMKuygYAQeKIRHaCgUfIeajUzUg7jS5AglwU-3ob2C1LyAVwHzVGzRGC+wVqfwQ2FgqgwFHIPN+IDyQA

Repro steps

Use a TSInstantiationExpression as default value in parameter list.

Todo: (BuildHIR::node.lowerReorderableExpression) Expression type `TSInstantiationExpression` cannot be safely reordered

How often does this bug happen?

Every time

What version of React are you using?

React Compiler Playground

What version of React Compiler are you using?

React Compiler Playground

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions