Skip to content

Avoid crash arising from trying to find conversions from polymorphic singleton types #18760

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

Merged
merged 2 commits into from
Oct 25, 2023

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Oct 25, 2023

This is an alternative fix for #18695, which already got fixed in a different way by #18719. This PR adds the actual tests, and leaves in the fix as a defensive measure in case the situation arises by some other means than the one fixed in #18719.

…singleton types

This is an alternative fix for scala#18695, which already got fixed in a different way by scala#18719.
This PR adds the actual tests, and leaves in the fix as a defensive measure in case the situation
arises by some other means than the one foxed in scala#18719.
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.

LGTM, but it's missing the test cases you mentioned

@dwijnand dwijnand enabled auto-merge October 25, 2023 16:26
@dwijnand dwijnand merged commit 2cf4ac3 into scala:main Oct 25, 2023
@dwijnand dwijnand deleted the fix-18695 branch October 25, 2023 16:52
odersky added a commit that referenced this pull request Dec 17, 2023
Using issue #18650 as the reference (but issue #18999 is another option)
building on the fix in PR #18719 (refined in PR #18727) as well as the
fix in PR #18760, I'm trying to make a more root change here by making
sure that message forcing only occurs with `hasErrors`/`errorsReported`
is true, so as to avoid assertion errors crashing the compiler.
@Kordyjan Kordyjan added this to the 3.4.0 milestone Dec 20, 2023
dwijnand pushed a commit to dwijnand/scala3 that referenced this pull request Feb 21, 2024
Using issue scala#18650 as the reference (but issue scala#18999 is another option)
building on the fix in PR scala#18719 (refined in PR scala#18727) as well as the
fix in PR scala#18760, I'm trying to make a more root change here by making
sure that message forcing only occurs with `hasErrors`/`errorsReported`
is true, so as to avoid assertion errors crashing the compiler.

(cherry picked from commit 10f2c10)
dwijnand pushed a commit to dwijnand/scala3 that referenced this pull request Mar 5, 2024
Using issue scala#18650 as the reference (but issue scala#18999 is another option)
building on the fix in PR scala#18719 (refined in PR scala#18727) as well as the
fix in PR scala#18760, I'm trying to make a more root change here by making
sure that message forcing only occurs with `hasErrors`/`errorsReported`
is true, so as to avoid assertion errors crashing the compiler.

(cherry picked from commit 10f2c10)
WojciechMazur added a commit that referenced this pull request Jun 23, 2024
…lymorphic singleton types" to LTS (#20740)

Backports #18760 to the LTS branch.

PR submitted by the release tooling.
[skip ci]
# 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.

3 participants