Skip to content

Conversation

@smarter
Copy link
Member

@smarter smarter commented Nov 11, 2025

Previously, the valueOf inline call succeeded (because the ValueOf synthesizer calls ref which calls singleton), leading to an invalid tree which crashed in the backend with: "assertion failed: Cannot create ClassBType from NoSymbol"

@odersky odersky assigned smarter and unassigned odersky Nov 13, 2025
Previously, the valueOf inline call succeeded (because the ValueOf synthesizer
calls `tpd.ref` which calls `tpd.singleton`), leading to an invalid tree which
crashed in the backend with: "assertion failed: Cannot create ClassBType from
NoSymbol".

Fixed by throwing a TypeError from `tpd.singleton`, unfortunatley this means
tests/neg/i8623.scala gets a worse error message because the implicit search
fails early, but arguably this is more correct.
@smarter smarter enabled auto-merge November 13, 2025 14:24
@smarter smarter merged commit 29ca0dc into scala:main Nov 13, 2025
49 checks passed
@smarter smarter deleted the valueOf-crash branch November 13, 2025 15:07
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