Skip to content

Fix Java record unapply crash under explicit nulls - #26975

Merged
olhotak merged 1 commit into
scala:mainfrom
dotty-staging:fix/java-record-unapply-flexible-types
Sep 4, 2026
Merged

Fix Java record unapply crash under explicit nulls#26975
olhotak merged 1 commit into
scala:mainfrom
dotty-staging:fix/java-record-unapply-flexible-types

Conversation

@olhotak

@olhotak olhotak commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

#26497 did not consider explicit nulls, specifically the flexible types that are added for Java varargs. This PR fixes a crash when using the generated unapply under explicit nulls.

Have you relied on LLM-based tools in this contribution?

Yes, and I checked fix and tests by hand.

How was the solution tested?

New automated tests

scala#26497 did not consider explicit nulls, specifically the flexible types that are added for Java varargs. This PR fixes a crash when using the unapply under explicit nulls.

@tgodzik tgodzik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM I think there is a flaky test, rerunning it

@olhotak
olhotak merged commit 1c0248c into scala:main Sep 4, 2026
77 of 78 checks passed
@olhotak
olhotak deleted the fix/java-record-unapply-flexible-types branch September 4, 2026 08:24
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.

2 participants