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

Fix #21669: Check parents non-empty before calling reduceLeft #21673

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

noti0na1
Copy link
Member

Fix #21669

This part of code is from #20084

We should check parents is non-empty before calling reduceLeft.

I haven't been able to create a standalone test.

@noti0na1
Copy link
Member Author

noti0na1 commented Sep 30, 2024

Hi @odersky @EugeneFlesselle , I saw you worked on #20084. Do you think an empty parents is a valid case?

We also have many other places where we call parents.reduceLeft directly, do you think we need to concern these places as well? I guess these places are ok because the types must be classes/enums.

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.

Scala 3.5.x compiler crash with java.lang.UnsupportedOperationException: empty.reduceLeft
1 participant