Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Immutable, primitive, numeric values cause a cast error when generating the key #71

Closed
realityforge opened this issue Jun 23, 2020 · 0 comments
Labels

Comments

@realityforge
Copy link
Member

Adding code like:

  @Input( immutable = true )
  abstract int eventId();

Will produce code like:

  (int) inputs.get( React4j_EventCoordination.Inputs.eventId )

when generating key part for input which generates an error as the javascript number type (which is what is stored in the inputs map) is mapped to a java double/Double. Perhaps a way to fix this is to translate this to something like

  (int) (double) inputs.get( React4j_EventCoordination.Inputs.eventId )

however further testing is required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant