-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
Java 14 - pattern matching and record #11
Comments
Thanks for reporting! I will find time to check Java 14 (including records) next week and will report in this issue 👍 |
@bsideup That's how they get compiled using JDK 14 😄 Pattern matching:
is compiled into
Record
is compiled into
|
@bsideup it seems to use your plugin we'll have to wait the non-EA version of JDK 14. |
@lppedd with Jabel, you don't need to enable preview features. Pattern matching is supported in |
@bsideup I was testing with a clone of the project by enabling the |
unlike other features, Records require some pre/post processing, so you can't just "enable" them. |
@bsideup oh that's good to know! Thanks a lot! |
See #16 |
@lppedd you should not enable preview features with Jabel. |
@bsideup but if I don't enable them on Gradle build it will conflict with idea language settings |
@bsideup interesting! I'll give it a try, thanks! |
@bsideup works! Although it seems command line and IDEA have different behaviors. |
@lppedd you're right! I've changed it again, now it should work fine :) |
@bsideup works nicely now :) What's the magic here? |
@bsideup it compiles, but as soon as you start using preview features it complains :(. |
@lppedd make sure you have everything configured correctly. I just tried running the example project and it works fine: |
There is no magic, just we set it so that IDEA thinks that we're using preview features, but later, when the task gets executed, we remove the flag since we don't need it |
@bsideup my fault, I wanted to write manually instead of copy pasting and I was missing a |
@bsideup with IDEA it's useful to add |
I can confirm that it works with both records and pattern matching. Kudos @bsideup ! The only problem I had is that jitpack is not keeping those branch-artifacts around for long. In the meanwhile, I forked the project and created a pre-release. |
@Treehopper thanks for trying it! I will finish the branch and merge it hopefully soon, so that you don't need to build it from branch anymore. Sorry that it took so long, non-sideproject work has stolen most of my time recently, but it is getting better :) |
FYI Jabel 0.3.0 adds support for the pattern matching (the records are still WIP)
|
Hi! This plugin should already support pattern matching, we just need to wait for a Gradle release which supports JDK 14 😄
Opened issue so it can be seen by others and closed when it's tested.
The text was updated successfully, but these errors were encountered: