Skip to content

Conversation

@mpalat
Copy link
Contributor

@mpalat mpalat commented Nov 26, 2025

What it does

Fixes the Record Type Inference issue as mentioned in #4643

How to test

Two test cases mentioned in the issue can be tried to check the fix. These test cases have been coded as unit test cases as well in the PR.

Fix is to do the component resolution once the record type inference is done, set the outer expression type and then call the resolution on patterns .

Author checklist

@mpalat
Copy link
Contributor Author

mpalat commented Nov 26, 2025

@stephan-herrmann can you please do a quick review of this? Checking whether we can push it for RC2?

@srikanth-sankaran
Copy link
Contributor

Can we check how far back the current behavior goes ? Unless this is a regression introduced in 4.38 we may want to wait and release this as soon as 4.39 opens for development

@mpalat
Copy link
Contributor Author

mpalat commented Nov 26, 2025

Can we check how far back the current behavior goes ? Unless this is a regression introduced in 4.38 we may want to wait and release this as soon as 4.39 opens for development

sure @srikanth-sankaran. We can wait for 4.39 M1 as well. This issue is not a regression introduced in 4.38 and has been there (in 4.37 and 4.36).

@stephan-herrmann - Please chime in if you prefer this to go in 4.38.

Copy link
Contributor

@stephan-herrmann stephan-herrmann left a comment

Choose a reason for hiding this comment

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

Change looks good to me: every attempt to resolve a pattern should first set outerExpressionType (field exists under this name since #2878 / BETA_JAVA23).

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.

3 participants