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

[24] JEP 488: Primitive Types in Patterns, instanceof, and switch (Second Preview) #2900

Open
Tracked by #2899
mpalat opened this issue Sep 4, 2024 · 1 comment
Open
Tracked by #2899
Assignees
Milestone

Comments

@mpalat
Copy link
Contributor

mpalat commented Sep 4, 2024

ref: https://openjdk.org/jeps/488
https://bugs.openjdk.org/browse/JDK-8335876

JLS Changes here? => https://cr.openjdk.org/~abimpoudis/instanceof/latest/ - to confirm

Summary
Enhance pattern matching by allowing primitive types in all pattern contexts, and extend instanceof and switch to work with all primitive types.

This feature was originally proposed by JEP 455, and delivered as a preview feature in JDK 23
and the JDT Core issue #2298

@mpalat mpalat added this to the BETA_JAVA24 milestone Sep 4, 2024
@mpalat mpalat changed the title JEP draft: Primitive Types in Patterns, instanceof, and switch (Second Preview) [24] JEP draft: Primitive Types in Patterns, instanceof, and switch (Second Preview) Sep 5, 2024
@stephan-herrmann
Copy link
Contributor

@mpalat mpalat changed the title [24] JEP draft: Primitive Types in Patterns, instanceof, and switch (Second Preview) [24] JEP 488: Primitive Types in Patterns, instanceof, and switch (Second Preview) Nov 4, 2024
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

No branches or pull requests

2 participants