-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Update Tasty Reflect match type code #10690
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,13 +96,3 @@ trait SyntheticsSupport: | |
given dotc.core.Contexts.Context = qctx.asInstanceOf[scala.quoted.runtime.impl.QuotesImpl].ctx | ||
val cSym = c.symbol.asInstanceOf[dotc.core.Symbols.Symbol] | ||
cSym.typeRef.appliedTo(cSym.typeParams.map(_.typeRef)).asInstanceOf[TypeRepr] | ||
|
||
object MatchTypeCase: | ||
def unapply(tpe: TypeRepr): Option[(TypeRepr, TypeRepr)] = | ||
tpe match | ||
case AppliedType(t, Seq(from, to)) /*if t == MatchCaseType*/ => | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are these reflect extractor? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That was code that we used in the doctool to take apart match types. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This indicates that |
||
Some((from, to)) | ||
case TypeLambda(paramNames, paramTypes, AppliedType(t, Seq(from, to))) /*if t == MatchCaseType*/ => | ||
Some((from, to)) | ||
case _ => | ||
None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should keep the abstractions aligned with what is in TASTy and not add new ones.