Conversation
sjrd
reviewed
Sep 8, 2026
| override final def baseClasses(using Context): List[ClassSymbol] = hi.baseClasses | ||
| } | ||
| // override final def baseClasses(using Context): List[ClassSymbol] = hi.baseClasses | ||
| // } |
| // It is not necessary according to the use cases, so we choose to use a simpler | ||
| // rule. | ||
|
|
||
| def unapply(tp: Type)(using Context): Option[Type] = tp match |
Member
There was a problem hiding this comment.
Suggested change
| def unapply(tp: Type)(using Context): Option[Type] = tp match | |
| def unapply(tp: AppliedType)(using Context): Option[Type] = tp match |
Inside QuotesImpl the opaque `type FlexibleType = Types.AppliedType` is transparent, so `case FlexibleType(tp)` type-tests against AppliedType and matched any applied type. Returning `Some(...)` unconditionally then made the pattern irrefutable, and the inner `.get` threw NoSuchElementException for non-flexible applied types (e.g. List[Int], Option[String]) in TypeReprMethods.typeArgs. Quotes.scala already declares this as `Option[TypeRepr]`, so returning the dotc-level result directly is both simpler and within the published API. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
olhotak
force-pushed
the
rebased-simplified-26245
branch
from
September 9, 2026 07:20
d271d39 to
6a06a7d
Compare
olhotak
marked this pull request as ready for review
September 10, 2026 06:40
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.
This is a rebased version of #26245. It also removes the unrelated and now-outdated changes that enable explicit nulls by default, to make the changes for the representation of FlexibleType more clearly visible.
Have you relied on LLM-based tools in this contribution?
No
How was the solution tested?
Covered by existing tests (this is a refactoring)