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

[Patterns] Cumulative fixes for various problems #2011

Conversation

srikanth-sankaran
Copy link
Contributor

@srikanth-sankaran srikanth-sankaran commented Feb 13, 2024

What it does

How to test

Author checklist

@srikanth-sankaran srikanth-sankaran self-assigned this Feb 13, 2024
@srikanth-sankaran srikanth-sankaran force-pushed the patterns-accumulated-fixes branch 4 times, most recently from bcbf82a to f5736ee Compare February 13, 2024 13:46
@srikanth-sankaran srikanth-sankaran force-pushed the patterns-accumulated-fixes branch 6 times, most recently from 50692f9 to 8bea15f Compare February 14, 2024 20:19
Copy link
Contributor

@mpalat mpalat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1
merge please

@srikanth-sankaran srikanth-sankaran requested review from mpalat and removed request for mpalat February 15, 2024 08:52
Copy link
Contributor

@mpalat mpalat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry - approved by mistake -
will wait until it is fully ready

@srikanth-sankaran srikanth-sankaran force-pushed the patterns-accumulated-fixes branch 4 times, most recently from f056035 to dfb8bba Compare February 16, 2024 04:22
@srikanth-sankaran
Copy link
Contributor Author

srikanth-sankaran commented Feb 16, 2024

Hello David (@datho7561) - I am mostly done with cleaning up the pattern matching implementation. This branch contains a bunch of fixes that were late for 4.31 and so are being accumulated here. Once master opens for 4.32 development, (March 2nd) I will merge these in.

The most recent two commits concern your past work - you are welcome to review them and report any problems. I invite you to review all the changes not just those two commit if time permits. If you want to continue your work on #1742 - you will have to study Pattern.java, TypePattern.java, RecordPattern.java, GuardedPattern.java and InstanceofExpression.java - things have changed a whole lot since the time you worked on unnamed patterns.

Where are you on #1742 ?? If you are able to bring it up to date with this branch (not master), I can look into absorbing it. Is that PR fully functional ? What is missing if anything ?

@datho7561
Copy link
Contributor

I'll spend some time rebasing that PR onto this one. Most of my changes for the parsing aspect shouldn't cause conflicts. I'll need to add my code generation changes, and that's where the conflicts will be. I think your refactoring will make the code generation code simpler.

@srikanth-sankaran srikanth-sankaran force-pushed the patterns-accumulated-fixes branch 3 times, most recently from 24e7247 to 1bfc417 Compare February 18, 2024 03:23
@srikanth-sankaran srikanth-sankaran force-pushed the patterns-accumulated-fixes branch from 1bfc417 to e3da39a Compare February 18, 2024 12:23
@srikanth-sankaran
Copy link
Contributor Author

srikanth-sankaran commented Feb 18, 2024

Hi David (@datho7561) the most recent commit made for #2044 may impact you too - but should be in a good way overall.

@srikanth-sankaran srikanth-sankaran force-pushed the patterns-accumulated-fixes branch from 33379f1 to bb94409 Compare February 19, 2024 00:59
srikanth-sankaran and others added 10 commits March 5, 2024 06:19
possibly involving record pattern type inference

* Apply missing capture conversion.

* Apply upward projection on the component type not on record type.

* Fix spurious code in RecordPattern.dominates

* Ignore parameterization when checking whether a class is a permitted
subclass of a sealed class

Fixes eclipse-jdt#2007
Co-authored-by: David Thompson <[email protected]>
Signed-off-by: David Thompson <[email protected]>
* Use JavaFeature rather than ad-hoc checks for feature availability
* Fix compiler crash when translating non-looping while loops
* Remove superfluous calls to recordInitializationStates and
safeInitsWhenTrue
* Align with JLS on terminology of unguarded patterns
@srikanth-sankaran srikanth-sankaran force-pushed the patterns-accumulated-fixes branch 6 times, most recently from 8b2de1c to 2c942de Compare March 5, 2024 01:54
@srikanth-sankaran srikanth-sankaran force-pushed the patterns-accumulated-fixes branch from 2c942de to 1b7735e Compare March 5, 2024 02:00
@srikanth-sankaran srikanth-sankaran merged commit e060f2b into eclipse-jdt:master Mar 5, 2024
9 checks passed
iloveeclipse added a commit to iloveeclipse/eclipse.jdt.ui that referenced this pull request Mar 5, 2024
Fixes test fail `HierarchicalASTVisitor must be updated to reflect a
change in the ASTNode hierarchy. No method visit(EitherOrMultiPattern)
was found in HierarchicalASTVisitor.`

See eclipse-jdt/eclipse.jdt.core#2011
iloveeclipse added a commit to iloveeclipse/eclipse.jdt.ui that referenced this pull request Mar 5, 2024
Fixes test fail `HierarchicalASTVisitor must be updated to reflect a
change in the ASTNode hierarchy. No method visit(EitherOrMultiPattern)
was found in HierarchicalASTVisitor.`

See eclipse-jdt/eclipse.jdt.core#2011
iloveeclipse added a commit to iloveeclipse/eclipse.jdt.ui that referenced this pull request Mar 6, 2024
Fixes test fail `HierarchicalASTVisitor must be updated to reflect a
change in the ASTNode hierarchy. No method visit(EitherOrMultiPattern)
was found in HierarchicalASTVisitor.`

See eclipse-jdt/eclipse.jdt.core#2011
iloveeclipse added a commit to eclipse-jdt/eclipse.jdt.ui that referenced this pull request Mar 6, 2024
Fixes test fail `HierarchicalASTVisitor must be updated to reflect a
change in the ASTNode hierarchy. No method visit(EitherOrMultiPattern)
was found in HierarchicalASTVisitor.`

See eclipse-jdt/eclipse.jdt.core#2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment