Repository navigation
Re-fix #26959 by avoiding Unit =:= on class refs to fix cyclic TASTy load - #27045
Merged
Merged
Conversation
bishabosha
reviewed
Sep 10, 2026
| private def nonClassEqUnit(tp: Type)(using Context): Boolean = tp.stripTypeVar match | ||
| case tref: TypeRef if tref.symbol.isClass => false | ||
| case AnnotatedType(tp1, _) => nonClassEqUnit(tp1) | ||
| case _ => tp =:= defn.UnitType |
Member
There was a problem hiding this comment.
is another possible working solution frozen_=:=? (and without this potentially flaky destructuring)
Contributor
Author
There was a problem hiding this comment.
Tried it, but it seems it makes the tests fail again... but I may be missing something.
Feel free to open an alternative approach.
Gedochao
marked this pull request as ready for review
September 10, 2026 14:49
SolalPirelli
approved these changes
Sep 11, 2026
alexarchambault
pushed a commit
to plasmon-scala/scala3
that referenced
this pull request
Nov 4, 2026
โฆASTy load (scala#27045) Fixes scala#26959 ~This merely ports tests from scala#27010 / scala#1112 to the `main` branch, to prevent scala#26959 from haunting us again (as we fixed it by accident, mostly ๐)~ As per scala#26959 (comment), it seems we need to re-fix this for Scala 3.10. This is almost the same as scala#1112, just without the optimizer adjustments. ## Have you relied on LLM-based tools in this contribution? No ## How was the solution tested? New automated tests (including the issue's reproducer, if applicable) [Cherry-picked a054e71]
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.
Fixes #26959
This merely ports tests from #27010 / scala#1112 to themainbranch, to prevent #26959 from haunting us again (as we fixed it by accident, mostly ๐)As per #26959 (comment), it seems we need to re-fix this for Scala 3.10.
This is almost the same as scala#1112, just without the optimizer adjustments.
Have you relied on LLM-based tools in this contribution?
No
How was the solution tested?
New automated tests (including the issue's reproducer, if applicable)