Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow case classes with up to 254 parameters #16501

Merged
merged 2 commits into from
Dec 12, 2022

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Dec 11, 2022

To achieve this, we need to avoid linear composition of conditions in the equals method.

Fixes #16500

Required to avoid linear composition of conditions in the `equals` method.

Fixes scala#16500
The original error case scala#16500 showed an example of deeply nested code
which blew up TreePickler with a StackOverflow. We now handle this situation
and provide better error diagnostics

 - point to the closes enclosing definition that caused the SO when pickled
 - suggest to increase the stack size with -Xss
Copy link
Member

@dwijnand dwijnand left a comment

Choose a reason for hiding this comment

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

Very nice!

@dwijnand dwijnand merged commit 7b7c055 into scala:main Dec 12, 2022
@dwijnand dwijnand deleted the fix-16500 branch December 12, 2022 09:58
@Kordyjan Kordyjan added this to the 3.3.0 milestone Aug 1, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

case class with more than 195 fields causes stackOverflowError in pickler
3 participants