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

Add support for Java 14 Records #9934

Draft
wants to merge 28 commits into
base: main
Choose a base branch
from

Conversation

niloc132
Copy link
Contributor

@niloc132 niloc132 commented Mar 5, 2024

Implements records as Java objects, so they can be transpiled to JS. Unlike in Java bytecode, hashCode/toString/equals have a complete implementation, rather than using method references and constant bootstrap to generate code at runtime.

Before ready to review:

  • Finish three remaining TODOs in the ast builder.
  • Add more tests to confirm user code can replace generated implementations.
  • Fix formatting.
  • Resolve conflicts in records in jsinterop spec, and test and implement any modified restrictions/constraints. This may be moved to a separate issue.

Fixes #9894

@niloc132 niloc132 added this to the 2.12 milestone Mar 5, 2024
@niloc132
Copy link
Contributor Author

Proposed jsinterop spec changes are implemented - building more tests now, then should be ready for review.

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

Successfully merging this pull request may close these issues.

Add compiler implementation, JRE emulation, and tests for Java 16 record types
1 participant