Skip to content

[Compiler Bug]: "Internal error: MethodCall::property must be an unpromoted..." on specific Math.floor, Math.ceil usages #34072

@deivshon

Description

@deivshon

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/#N4Igzg9grgTgxgUxALhASwLYAcIwC4AEwBAZgHYEC+pMEGBAOiADZoBGTDZXCAHjvgJwIZMIQBCtANYIyARgIBeAgAoAlEoB8RLgSEixBAG4BDZlARLSZdboIwEeWBQA8AEzRHNwALIm8ABYAdCTMELgqfoFBJmxgKqbmCGpqlC4A9B5ednq5jGSUXDz8uITCohLSsgBMVupaOhT6FcZmFlbktk0OTjCuWd5RwYhozJH+wbHxiRYpaZmemkUFXCCUQA

Repro steps

  1. Save a value computed using a function into a variable in render
  2. Use said variable in one of these expressions in render: Math.floor(Math.abs(value)) or Math.ceil(Math.abs(value))

How often does this bug happen?

Every time

What version of React are you using?

19.1

What version of React Compiler are you using?

c260b38

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: UnconfirmedA potential issue that we haven't yet confirmed as a bugType: Bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions