enable strictEqualityPatternMatching behaviour for non-case objects#25850
Merged
SolalPirelli merged 1 commit intoscala:mainfrom Apr 28, 2026
Merged
enable strictEqualityPatternMatching behaviour for non-case objects#25850SolalPirelli merged 1 commit intoscala:mainfrom
SolalPirelli merged 1 commit intoscala:mainfrom
Conversation
Member
|
hoping this could make 3.9 — discussion on scala/improvement-proposals#97 |
Contributor
Let's talk about this on Scala Core. |
Member
|
Core agreed this is fine to merge for 3.9, assuming no new doubts arise at the April 24 SIP meeting. Reasoning: the feature is experimental anyway, and the implementation changes don't appear risky. |
Contributor
Author
|
Since core has approved this, is anything else missing to merge this? |
SethTisue
approved these changes
Apr 26, 2026
Contributor
Author
|
🥳 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
after collecting feedback for strictEqualityPatternMatching (SIP-67), I've come to the conclusion that only enabling this behaviour for
case objects isn't useful and it's better to enable it for allobjects. Declaring ADTs without thecasemodifier for the relevant objects isn't that uncommon and there's no reason to not have it work in that case, too.I've amended SIP-67 accordingly and I hope the SIP committee will approve the change soon.