diff --git a/compiler/src/scala/quoted/runtime/impl/QuotesImpl.scala b/compiler/src/scala/quoted/runtime/impl/QuotesImpl.scala index 5b4296fd5daa..adb2194c2b1d 100644 --- a/compiler/src/scala/quoted/runtime/impl/QuotesImpl.scala +++ b/compiler/src/scala/quoted/runtime/impl/QuotesImpl.scala @@ -29,7 +29,7 @@ object QuotesImpl { new QuotesImpl def showDecompiledTree(tree: tpd.Tree)(using Context): String = - import qctx.reflect.TreeMethodsImpl.{showAnsiColored, show} + import qctx.reflect.TreeMethods.{showAnsiColored, show} val qctx: QuotesImpl = new QuotesImpl(using MacroExpansion.context(tree)) if ctx.settings.color.value == "always" then showAnsiColored(tree) else show(tree) @@ -48,10 +48,10 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler extension [T](self: scala.quoted.Expr[T]): def show: String = - reflect.TreeMethodsImpl.show(reflect.Term.of(self)) + reflect.TreeMethods.show(reflect.Term.of(self)) def showAnsiColored: String = - reflect.TreeMethodsImpl.showAnsiColored(reflect.Term.of(self)) + reflect.TreeMethods.showAnsiColored(reflect.Term.of(self)) def matches(that: scala.quoted.Expr[Any]): Boolean = treeMatch(reflect.Term.of(self), reflect.Term.of(that)).nonEmpty @@ -61,7 +61,7 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler extension [X](self: scala.quoted.Expr[Any]): /** Checks is the `quoted.Expr[?]` is valid expression of type `X` */ def isExprOf(using scala.quoted.Type[X]): Boolean = - reflect.TypeReprMethodsImpl.<:<(reflect.Term.of(self).tpe)(reflect.TypeRepr.of[X]) + reflect.TypeReprMethods.<:<(reflect.Term.of(self).tpe)(reflect.TypeRepr.of[X]) /** Convert this to an `quoted.Expr[X]` if this expression is a valid expression of type `X` or throws */ def asExprOf(using scala.quoted.Type[X]): scala.quoted.Expr[X] = { @@ -70,8 +70,8 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler else throw Exception( s"""Expr cast exception: ${self.show} - |of type: ${reflect.TypeReprMethodsImpl.show(reflect.Term.of(self).tpe)} - |did not conform to type: ${reflect.TypeReprMethodsImpl.show(reflect.TypeRepr.of[X])} + |of type: ${reflect.TypeReprMethods.show(reflect.Term.of(self).tpe)} + |did not conform to type: ${reflect.TypeReprMethods.show(reflect.TypeRepr.of[X])} |""".stripMargin ) } @@ -85,7 +85,7 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler def of(expr: Expr[Any]): Tree = Term.of(expr) end Tree - object TreeMethodsImpl extends TreeMethods: + given TreeMethods: TreeMethods with extension (self: Tree): def pos: Position = self.sourcePos def symbol: Symbol = self.symbol @@ -122,15 +122,15 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler tpd.TreeOps(self).changeNonLocalOwners(newOwner).asInstanceOf[ThisTree] end extension - end TreeMethodsImpl + end TreeMethods type PackageClause = tpd.PackageDef - object PackageClauseTypeTestImpl extends TypeTest[Tree, PackageClause]: + object PackageClauseTypeTest extends TypeTest[Tree, PackageClause]: def unapply(x: Tree): Option[PackageClause & x.type] = x match case x: (tpd.PackageDef & x.type) => Some(x) case _ => None - end PackageClauseTypeTestImpl + end PackageClauseTypeTest object PackageClause extends PackageClauseModule: def apply(pid: Ref, stats: List[Tree]): PackageClause = @@ -141,20 +141,20 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((tree.pid, tree.stats)) end PackageClause - object PackageClauseMethodsImpl extends PackageClauseMethods: + given PackageClauseMethods: PackageClauseMethods with extension (self: PackageClause): def pid: Ref = self.pid def stats: List[Tree] = self.stats end extension - end PackageClauseMethodsImpl + end PackageClauseMethods type Import = tpd.Import - object ImportTypeTestImpl extends TypeTest[Tree, Import]: + object ImportTypeTest extends TypeTest[Tree, Import]: def unapply(x: Tree): Option[Import & x.type] = x match case tree: (tpd.Import & x.type) => Some(tree) case _ => None - end ImportTypeTestImpl + end ImportTypeTest object Import extends ImportModule: def apply(expr: Term, selectors: List[Selector]): Import = @@ -165,12 +165,12 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((tree.expr, tree.selectors)) end Import - object ImportMethodsImpl extends ImportMethods: + given ImportMethods: ImportMethods with extension (self: Import): def expr: Term = self.expr def selectors: List[Selector] = self.selectors end extension - end ImportMethodsImpl + end ImportMethods type Export = tpd.Export @@ -185,47 +185,47 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((tree.expr, tree.selectors)) end Export - object ExportMethodsImpl extends ExportMethods: + given ExportMethods: ExportMethods with extension (self: Export): def expr: Term = self.expr def selectors: List[Selector] = self.selectors end extension - end ExportMethodsImpl + end ExportMethods type Statement = tpd.Tree - object StatementTypeTestImpl extends TypeTest[Tree, Statement]: + object StatementTypeTest extends TypeTest[Tree, Statement]: def unapply(x: Tree): Option[Statement & x.type] = x match case _: tpd.PatternTree => None case _ => if x.isTerm then TermTypeTest.unapply(x) else DefinitionTypeTest.unapply(x) - end StatementTypeTestImpl + end StatementTypeTest type Definition = tpd.MemberDef - object DefinitionTypeTestImpl extends TypeTest[Tree, Definition]: + object DefinitionTypeTest extends TypeTest[Tree, Definition]: def unapply(x: Tree): Option[Definition & x.type] = x match case x: (tpd.MemberDef & x.type) => Some(x) case _ => None - end DefinitionTypeTestImpl + end DefinitionTypeTest object Definition extends DefinitionModule - object DefinitionMethodsImpl extends DefinitionMethods: + given DefinitionMethods: DefinitionMethods with extension (self: Definition): def name: String = self match case self: tpd.MemberDef => self.name.toString end extension - end DefinitionMethodsImpl + end DefinitionMethods type ClassDef = tpd.TypeDef - object ClassDefTypeTestImpl extends TypeTest[Tree, ClassDef]: + object ClassDefTypeTest extends TypeTest[Tree, ClassDef]: def unapply(x: Tree): Option[ClassDef & x.type] = x match case x: (tpd.TypeDef & x.type) if x.isClassDef => Some(x) case _ => None - end ClassDefTypeTestImpl + end ClassDefTypeTest object ClassDef extends ClassDefModule: def copy(original: Tree)(name: String, constr: DefDef, parents: List[Tree], derived: List[TypeTree], selfOpt: Option[ValDef], body: List[Statement]): ClassDef = { @@ -237,7 +237,7 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((cdef.name.toString, cdef.constructor, cdef.parents, rhs.derived.asInstanceOf[List[TypeTree]], cdef.self, rhs.body)) end ClassDef - object ClassDefMethodsImpl extends ClassDefMethods: + given ClassDefMethods: ClassDefMethods with extension (self: ClassDef): def constructor: DefDef = self.rhs.asInstanceOf[tpd.Template].constr @@ -250,15 +250,15 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler def body: List[Statement] = self.rhs.asInstanceOf[tpd.Template].body end extension - end ClassDefMethodsImpl + end ClassDefMethods type DefDef = tpd.DefDef - object DefDefTypeTestImpl extends TypeTest[Tree, DefDef]: + object DefDefTypeTest extends TypeTest[Tree, DefDef]: def unapply(x: Tree): Option[DefDef & x.type] = x match case x: (tpd.DefDef & x.type) => Some(x) case _ => None - end DefDefTypeTestImpl + end DefDefTypeTest object DefDef extends DefDefModule: def apply(symbol: Symbol, rhsFn: List[TypeRepr] => List[List[Term]] => Option[Term]): DefDef = @@ -269,22 +269,22 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((ddef.name.toString, ddef.typeParams, ddef.paramss, ddef.tpt, optional(ddef.rhs))) end DefDef - object DefDefMethodsImpl extends DefDefMethods: + given DefDefMethods: DefDefMethods with extension (self: DefDef): def typeParams: List[TypeDef] = self.tparams def paramss: List[List[ValDef]] = self.vparamss def returnTpt: TypeTree = self.tpt def rhs: Option[Term] = optional(self.rhs) end extension - end DefDefMethodsImpl + end DefDefMethods type ValDef = tpd.ValDef - object ValDefTypeTestImpl extends TypeTest[Tree, ValDef]: + object ValDefTypeTest extends TypeTest[Tree, ValDef]: def unapply(x: Tree): Option[ValDef & x.type] = x match case x: (tpd.ValDef & x.type) => Some(x) case _ => None - end ValDefTypeTestImpl + end ValDefTypeTest object ValDef extends ValDefModule: def apply(symbol: Symbol, rhs: Option[Term]): ValDef = @@ -306,20 +306,20 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Block(vdefs, body(refs)) end ValDef - object ValDefMethodsImpl extends ValDefMethods: + given ValDefMethods: ValDefMethods with extension (self: ValDef): def tpt: TypeTree = self.tpt def rhs: Option[Term] = optional(self.rhs) end extension - end ValDefMethodsImpl + end ValDefMethods type TypeDef = tpd.TypeDef - object TypeDefTypeTestImpl extends TypeTest[Tree, TypeDef]: + object TypeDefTypeTest extends TypeTest[Tree, TypeDef]: def unapply(x: Tree): Option[TypeDef & x.type] = x match case x: (tpd.TypeDef & x.type) if !x.isClassDef => Some(x) case _ => None - end TypeDefTypeTestImpl + end TypeDefTypeTest object TypeDef extends TypeDefModule: def apply(symbol: Symbol): TypeDef = @@ -330,15 +330,15 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((tdef.name.toString, tdef.rhs)) end TypeDef - object TypeDefMethodsImpl extends TypeDefMethods: + given TypeDefMethods: TypeDefMethods with extension (self: TypeDef): def rhs: Tree = self.rhs end extension - end TypeDefMethodsImpl + end TypeDefMethods type Term = tpd.Tree - object TermTypeTestImpl extends TypeTest[Tree, Term]: + object TermTypeTest extends TypeTest[Tree, Term]: def unapply(x: Tree): Option[Term & x.type] = x match case _ if UnapplyTypeTest.unapply(x).isDefined => None case _: tpd.PatternTree => None @@ -347,7 +347,7 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler case x: (tpd.Inlined & x.type) => Some(x) case x: (tpd.NamedArg & x.type) => Some(x) case _ => None - end TermTypeTestImpl + end TermTypeTest object Term extends TermModule: def of(expr: Expr[Any]): Term = @@ -369,7 +369,7 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler None end Term - object TermMethodsImpl extends TermMethods: + given TermMethods: TermMethods with extension (self: Term): def seal: scala.quoted.Expr[Any] = if self.isExpr then new ExprImpl(self, QuotesImpl.this.hashCode) @@ -413,15 +413,15 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler def select(sym: Symbol): Select = Select(self, sym) end extension - end TermMethodsImpl + end TermMethods type Ref = tpd.RefTree - object RefTypeTestImpl extends TypeTest[Tree, Ref]: + object RefTypeTest extends TypeTest[Tree, Ref]: def unapply(x: Tree): Option[Ref & x.type] = x match case x: (tpd.RefTree & x.type) if x.isTerm => Some(x) case _ => None - end RefTypeTestImpl + end RefTypeTest object Ref extends RefModule: def term(tp: TermRef): Ref = @@ -433,11 +433,11 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler type Ident = tpd.Ident - object IdentTypeTestImpl extends TypeTest[Tree, Ident]: + object IdentTypeTest extends TypeTest[Tree, Ident]: def unapply(x: Tree): Option[Ident & x.type] = x match case x: (tpd.Ident & x.type) if x.isTerm => Some(x) case _ => None - end IdentTypeTestImpl + end IdentTypeTest object Ident extends IdentModule: def apply(tmref: TermRef): Term = @@ -448,19 +448,19 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some(tree.name.toString) end Ident - object IdentMethodsImpl extends IdentMethods: + given IdentMethods: IdentMethods with extension (self: Ident): def name: String = self.name.toString end extension - end IdentMethodsImpl + end IdentMethods type Select = tpd.Select - object SelectTypeTestImpl extends TypeTest[Tree, Select]: + object SelectTypeTest extends TypeTest[Tree, Select]: def unapply(x: Tree): Option[Select & x.type] = x match case x: (tpd.Select & x.type) if x.isTerm => Some(x) case _ => None - end SelectTypeTestImpl + end SelectTypeTest object Select extends SelectModule: def apply(qualifier: Term, symbol: Symbol): Select = @@ -480,7 +480,7 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((x.qualifier, x.name.toString)) end Select - object SelectMethodsImpl extends SelectMethods: + given SelectMethods: SelectMethods with extension (self: Select): def qualifier: Term = self.qualifier def name: String = self.name.toString @@ -488,15 +488,15 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler if self.symbol.signature == dotc.core.Signature.NotAMethod then None else Some(self.symbol.signature) end extension - end SelectMethodsImpl + end SelectMethods type Literal = tpd.Literal - object LiteralTypeTestImpl extends TypeTest[Tree, Literal]: + object LiteralTypeTest extends TypeTest[Tree, Literal]: def unapply(x: Tree): Option[Literal & x.type] = x match case x: (tpd.Literal & x.type) => Some(x) case _ => None - end LiteralTypeTestImpl + end LiteralTypeTest object Literal extends LiteralModule: def apply(constant: Constant): Literal = @@ -507,19 +507,19 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some(x.constant) end Literal - object LiteralMethodsImpl extends LiteralMethods: + given LiteralMethods: LiteralMethods with extension (self: Literal): def constant: Constant = self.const end extension - end LiteralMethodsImpl + end LiteralMethods type This = tpd.This - object ThisTypeTestImpl extends TypeTest[Tree, This]: + object ThisTypeTest extends TypeTest[Tree, This]: def unapply(x: Tree): Option[This & x.type] = x match case x: (tpd.This & x.type) => Some(x) case _ => None - end ThisTypeTestImpl + end ThisTypeTest object This extends ThisModule: def apply(cls: Symbol): This = @@ -530,19 +530,19 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some(optional(x.qual).map(_.name.toString)) end This - object ThisMethodsImpl extends ThisMethods: + given ThisMethods: ThisMethods with extension (self: This): def id: Option[String] = optional(self.qual).map(_.name.toString) end extension - end ThisMethodsImpl + end ThisMethods type New = tpd.New - object NewTypeTestImpl extends TypeTest[Tree, New]: + object NewTypeTest extends TypeTest[Tree, New]: def unapply(x: Tree): Option[New & x.type] = x match case x: (tpd.New & x.type) => Some(x) case _ => None - end NewTypeTestImpl + end NewTypeTest object New extends NewModule: def apply(tpt: TypeTree): New = @@ -552,19 +552,19 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler def unapply(x: New): Option[TypeTree] = Some(x.tpt) end New - object NewMethodsImpl extends NewMethods: + given NewMethods: NewMethods with extension (self: New): def tpt: TypeTree = self.tpt end extension - end NewMethodsImpl + end NewMethods type NamedArg = tpd.NamedArg - object NamedArgTypeTestImpl extends TypeTest[Tree, NamedArg]: + object NamedArgTypeTest extends TypeTest[Tree, NamedArg]: def unapply(x: Tree): Option[NamedArg & x.type] = x match case x: (tpd.NamedArg & x.type) if x.name.isInstanceOf[dotc.core.Names.TermName] => Some(x) // TODO: Now, the name should alwas be a term name case _ => None - end NamedArgTypeTestImpl + end NamedArgTypeTest object NamedArg extends NamedArgModule: def apply(name: String, arg: Term): NamedArg = @@ -575,20 +575,20 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((x.name.toString, x.value)) end NamedArg - object NamedArgMethodsImpl extends NamedArgMethods: + given NamedArgMethods: NamedArgMethods with extension (self: NamedArg): def name: String = self.name.toString def value: Term = self.arg end extension - end NamedArgMethodsImpl + end NamedArgMethods type Apply = tpd.Apply - object ApplyTypeTestImpl extends TypeTest[Tree, Apply]: + object ApplyTypeTest extends TypeTest[Tree, Apply]: def unapply(x: Tree): Option[Apply & x.type] = x match case x: (tpd.Apply & x.type) => Some(x) case _ => None - end ApplyTypeTestImpl + end ApplyTypeTest object Apply extends ApplyModule: def apply(fun: Term, args: List[Term]): Apply = @@ -599,20 +599,20 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((x.fun, x.args)) end Apply - object ApplyMethodsImpl extends ApplyMethods: + given ApplyMethods: ApplyMethods with extension (self: Apply): def fun: Term = self.fun def args: List[Term] = self.args end extension - end ApplyMethodsImpl + end ApplyMethods type TypeApply = tpd.TypeApply - object TypeApplyTypeTestImpl extends TypeTest[Tree, TypeApply]: + object TypeApplyTypeTest extends TypeTest[Tree, TypeApply]: def unapply(x: Tree): Option[TypeApply & x.type] = x match case x: (tpd.TypeApply & x.type) => Some(x) case _ => None - end TypeApplyTypeTestImpl + end TypeApplyTypeTest object TypeApply extends TypeApplyModule: def apply(fun: Term, args: List[TypeTree]): TypeApply = @@ -623,20 +623,20 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((x.fun, x.args)) end TypeApply - object TypeApplyMethodsImpl extends TypeApplyMethods: + given TypeApplyMethods: TypeApplyMethods with extension (self: TypeApply): def fun: Term = self.fun def args: List[TypeTree] = self.args end extension - end TypeApplyMethodsImpl + end TypeApplyMethods type Super = tpd.Super - object SuperTypeTestImpl extends TypeTest[Tree, Super]: + object SuperTypeTest extends TypeTest[Tree, Super]: def unapply(x: Tree): Option[Super & x.type] = x match case x: (tpd.Super & x.type) => Some(x) case _ => None - end SuperTypeTestImpl + end SuperTypeTest object Super extends SuperModule: def apply(qual: Term, mix: Option[String]): Super = @@ -647,21 +647,21 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((x.qualifier, x.id)) end Super - object SuperMethodsImpl extends SuperMethods: + given SuperMethods: SuperMethods with extension (self: Super): def qualifier: Term = self.qual def id: Option[String] = optional(self.mix).map(_.name.toString) def idPos: Position = self.mix.sourcePos end extension - end SuperMethodsImpl + end SuperMethods type Typed = tpd.Typed - object TypedTypeTestImpl extends TypeTest[Tree, Typed]: + object TypedTypeTest extends TypeTest[Tree, Typed]: def unapply(x: Tree): Option[Typed & x.type] = x match case x: (tpd.Typed & x.type) => Some(x) case _ => None - end TypedTypeTestImpl + end TypedTypeTest object Typed extends TypedModule: def apply(expr: Term, tpt: TypeTree): Typed = @@ -672,20 +672,20 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((x.expr, x.tpt)) end Typed - object TypedMethodsImpl extends TypedMethods: + given TypedMethods: TypedMethods with extension (self: Typed): def expr: Term = self.expr def tpt: TypeTree = self.tpt end extension - end TypedMethodsImpl + end TypedMethods type Assign = tpd.Assign - object AssignTypeTestImpl extends TypeTest[Tree, Assign]: + object AssignTypeTest extends TypeTest[Tree, Assign]: def unapply(x: Tree): Option[Assign & x.type] = x match case x: (tpd.Assign & x.type) => Some(x) case _ => None - end AssignTypeTestImpl + end AssignTypeTest object Assign extends AssignModule: def apply(lhs: Term, rhs: Term): Assign = @@ -696,20 +696,20 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((x.lhs, x.rhs)) end Assign - object AssignMethodsImpl extends AssignMethods: + given AssignMethods: AssignMethods with extension (self: Assign): def lhs: Term = self.lhs def rhs: Term = self.rhs end extension - end AssignMethodsImpl + end AssignMethods type Block = tpd.Block - object BlockTypeTestImpl extends TypeTest[Tree, Block]: + object BlockTypeTest extends TypeTest[Tree, Block]: def unapply(x: Tree): Option[Block & x.type] = x match case x: (tpd.Block & x.type) => Some(x) case _ => None - end BlockTypeTestImpl + end BlockTypeTest object Block extends BlockModule: def apply(stats: List[Statement], expr: Term): Block = @@ -720,20 +720,20 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((x.statements, x.expr)) end Block - object BlockMethodsImpl extends BlockMethods: + given BlockMethods: BlockMethods with extension (self: Block): def statements: List[Statement] = self.stats def expr: Term = self.expr end extension - end BlockMethodsImpl + end BlockMethods type Closure = tpd.Closure - object ClosureTypeTestImpl extends TypeTest[Tree, Closure]: + object ClosureTypeTest extends TypeTest[Tree, Closure]: def unapply(x: Tree): Option[Closure & x.type] = x match case x: (tpd.Closure & x.type) => Some(x) case _ => None - end ClosureTypeTestImpl + end ClosureTypeTest object Closure extends ClosureModule: def apply(meth: Term, tpe: Option[TypeRepr]): Closure = @@ -744,12 +744,12 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((x.meth, x.tpeOpt)) end Closure - object ClosureMethodsImpl extends ClosureMethods: + given ClosureMethods: ClosureMethods with extension (self: Closure): def meth: Term = self.meth def tpeOpt: Option[TypeRepr] = optional(self.tpt).map(_.tpe) end extension - end ClosureMethodsImpl + end ClosureMethods object Lambda extends LambdaModule: def apply(owner: Symbol, tpe: MethodType, rhsFn: (Symbol, List[Tree]) => Tree): Block = @@ -766,11 +766,11 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler type If = tpd.If - object IfTypeTestImpl extends TypeTest[Tree, If]: + object IfTypeTest extends TypeTest[Tree, If]: def unapply(x: Tree): Option[If & x.type] = x match case x: (tpd.If & x.type) => Some(x) case _ => None - end IfTypeTestImpl + end IfTypeTest object If extends IfModule: def apply(cond: Term, thenp: Term, elsep: Term): If = @@ -781,22 +781,22 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((tree.cond, tree.thenp, tree.elsep)) end If - object IfMethodsImpl extends IfMethods: + given IfMethods: IfMethods with extension (self: If): def cond: Term = self.cond def thenp: Term = self.thenp def elsep: Term = self.elsep def isInline: Boolean = self.isInline end extension - end IfMethodsImpl + end IfMethods type Match = tpd.Match - object MatchTypeTestImpl extends TypeTest[Tree, Match]: + object MatchTypeTest extends TypeTest[Tree, Match]: def unapply(x: Tree): Option[Match & x.type] = x match case x: (tpd.Match & x.type) if !x.selector.isEmpty => Some(x) case _ => None - end MatchTypeTestImpl + end MatchTypeTest object Match extends MatchModule: def apply(selector: Term, cases: List[CaseDef]): Match = @@ -809,21 +809,21 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((x.scrutinee, x.cases)) end Match - object MatchMethodsImpl extends MatchMethods: + given MatchMethods: MatchMethods with extension (self: Match): def scrutinee: Term = self.selector def cases: List[CaseDef] = self.cases def isInline: Boolean = self.isInline end extension - end MatchMethodsImpl + end MatchMethods type SummonFrom = tpd.Match - object SummonFromTypeTestImpl extends TypeTest[Tree, SummonFrom]: + object SummonFromTypeTest extends TypeTest[Tree, SummonFrom]: def unapply(x: Tree): Option[SummonFrom & x.type] = x match case x: (tpd.Match & x.type) if x.selector.isEmpty => Some(x) case _ => None - end SummonFromTypeTestImpl + end SummonFromTypeTest object SummonFrom extends SummonFromModule: def apply(cases: List[CaseDef]): SummonFrom = @@ -834,19 +834,19 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some(x.cases) end SummonFrom - object SummonFromMethodsImpl extends SummonFromMethods: + given SummonFromMethods: SummonFromMethods with extension (self: SummonFrom): def cases: List[CaseDef] = self.cases end extension - end SummonFromMethodsImpl + end SummonFromMethods type Try = tpd.Try - object TryTypeTestImpl extends TypeTest[Tree, Try]: + object TryTypeTest extends TypeTest[Tree, Try]: def unapply(x: Tree): Option[Try & x.type] = x match case x: (tpd.Try & x.type) => Some(x) case _ => None - end TryTypeTestImpl + end TryTypeTest object Try extends TryModule: def apply(expr: Term, cases: List[CaseDef], finalizer: Option[Term]): Try = @@ -857,21 +857,21 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((x.body, x.cases, optional(x.finalizer))) end Try - object TryMethodsImpl extends TryMethods: + given TryMethods: TryMethods with extension (self: Try): def body: Term = self.expr def cases: List[CaseDef] = self.cases def finalizer: Option[Term] = optional(self.finalizer) end extension - end TryMethodsImpl + end TryMethods type Return = tpd.Return - object ReturnTypeTestImpl extends TypeTest[Tree, Return]: + object ReturnTypeTest extends TypeTest[Tree, Return]: def unapply(x: Tree): Option[Return & x.type] = x match case x: (tpd.Return & x.type) => Some(x) case _ => None - end ReturnTypeTestImpl + end ReturnTypeTest object Return extends ReturnModule: def apply(expr: Term, from: Symbol): Return = @@ -882,20 +882,20 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((x.expr, x.from.symbol)) end Return - object ReturnMethodsImpl extends ReturnMethods: + given ReturnMethods: ReturnMethods with extension (self: Return): def expr: Term = self.expr def from: Symbol = self.from.symbol end extension - end ReturnMethodsImpl + end ReturnMethods type Repeated = tpd.SeqLiteral - object RepeatedTypeTestImpl extends TypeTest[Tree, Repeated]: + object RepeatedTypeTest extends TypeTest[Tree, Repeated]: def unapply(x: Tree): Option[Repeated & x.type] = x match case x: (tpd.SeqLiteral & x.type) => Some(x) case _ => None - end RepeatedTypeTestImpl + end RepeatedTypeTest object Repeated extends RepeatedModule: def apply(elems: List[Term], elemtpt: TypeTree): Repeated = @@ -906,20 +906,20 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((x.elems, x.elemtpt)) end Repeated - object RepeatedMethodsImpl extends RepeatedMethods: + given RepeatedMethods: RepeatedMethods with extension (self: Repeated): def elems: List[Term] = self.elems def elemtpt: TypeTree = self.elemtpt end extension - end RepeatedMethodsImpl + end RepeatedMethods type Inlined = tpd.Inlined - object InlinedTypeTestImpl extends TypeTest[Tree, Inlined]: + object InlinedTypeTest extends TypeTest[Tree, Inlined]: def unapply(x: Tree): Option[Inlined & x.type] = x match case x: (tpd.Inlined & x.type) => Some(x) case _ => None - end InlinedTypeTestImpl + end InlinedTypeTest object Inlined extends InlinedModule: def apply(call: Option[Tree], bindings: List[Definition], expansion: Term): Inlined = @@ -930,24 +930,24 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((optional(x.call), x.bindings, x.body)) end Inlined - object InlinedMethodsImpl extends InlinedMethods: + given InlinedMethods: InlinedMethods with extension (self: Inlined): def call: Option[Tree] = optional(self.call) def bindings: List[Definition] = self.bindings def body: Term = self.expansion end extension - end InlinedMethodsImpl + end InlinedMethods type SelectOuter = tpd.Select - object SelectOuterTypeTestImpl extends TypeTest[Tree, SelectOuter]: + object SelectOuterTypeTest extends TypeTest[Tree, SelectOuter]: def unapply(x: Tree): Option[SelectOuter & x.type] = x match case x: (tpd.Select & x.type) => x.name match case NameKinds.OuterSelectName(_, _) => Some(x) case _ => None case _ => None - end SelectOuterTypeTestImpl + end SelectOuterTypeTest object SelectOuter extends SelectOuterModule: def apply(qualifier: Term, name: String, levels: Int): SelectOuter = @@ -958,7 +958,7 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((x.qualifier, x.name.toString, x.level)) end SelectOuter - object SelectOuterMethodsImpl extends SelectOuterMethods: + given SelectOuterMethods: SelectOuterMethods with extension (self: SelectOuter): def qualifier: Term = self.qualifier def name: String = self.name.toString @@ -966,15 +966,15 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler val NameKinds.OuterSelectName(_, levels) = self.name levels end extension - end SelectOuterMethodsImpl + end SelectOuterMethods type While = tpd.WhileDo - object WhileTypeTestImpl extends TypeTest[Tree, While]: + object WhileTypeTest extends TypeTest[Tree, While]: def unapply(x: Tree): Option[While & x.type] = x match case x: (tpd.WhileDo & x.type) => Some(x) case _ => None - end WhileTypeTestImpl + end WhileTypeTest object While extends WhileModule: def apply(cond: Term, body: Term): While = @@ -985,40 +985,40 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((x.cond, x.body)) end While - object WhileMethodsImpl extends WhileMethods: + given WhileMethods: WhileMethods with extension (self: While): def cond: Term = self.cond def body: Term = self.body end extension - end WhileMethodsImpl + end WhileMethods type TypeTree = tpd.Tree - object TypeTreeTypeTestImpl extends TypeTest[Tree, TypeTree]: + object TypeTreeTypeTest extends TypeTest[Tree, TypeTree]: def unapply(x: Tree): Option[TypeTree & x.type] = x match case x: (tpd.TypeBoundsTree & x.type) => None case x: (tpd.Tree & x.type) if x.isType => Some(x) case _ => None - end TypeTreeTypeTestImpl + end TypeTreeTypeTest object TypeTree extends TypeTreeModule: def of[T <: AnyKind](using tp: scala.quoted.Type[T]): TypeTree = tp.asInstanceOf[TypeImpl].typeTree end TypeTree - object TypeTreeMethodsImpl extends TypeTreeMethods: + given TypeTreeMethods: TypeTreeMethods with extension (self: TypeTree): def tpe: TypeRepr = self.tpe.stripTypeVar end extension - end TypeTreeMethodsImpl + end TypeTreeMethods type Inferred = tpd.TypeTree - object InferredTypeTestImpl extends TypeTest[Tree, Inferred]: + object InferredTypeTest extends TypeTest[Tree, Inferred]: def unapply(x: Tree): Option[Inferred & x.type] = x match case tpt: (tpd.TypeTree & x.type) if !tpt.tpe.isInstanceOf[Types.TypeBounds] => Some(tpt) case _ => None - end InferredTypeTestImpl + end InferredTypeTest object Inferred extends InferredModule: def apply(tpe: TypeRepr): Inferred = @@ -1028,11 +1028,11 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler type TypeIdent = tpd.Ident - object TypeIdentTypeTestImpl extends TypeTest[Tree, TypeIdent]: + object TypeIdentTypeTest extends TypeTest[Tree, TypeIdent]: def unapply(x: Tree): Option[TypeIdent & x.type] = x match case tpt: (tpd.Ident & x.type) if tpt.isType => Some(tpt) case _ => None - end TypeIdentTypeTestImpl + end TypeIdentTypeTest object TypeIdent extends TypeIdentModule: def apply(sym: Symbol): TypeTree = @@ -1044,19 +1044,19 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some(x.name.toString) end TypeIdent - object TypeIdentMethodsImpl extends TypeIdentMethods: + given TypeIdentMethods: TypeIdentMethods with extension (self: TypeIdent): def name: String = self.name.toString end extension - end TypeIdentMethodsImpl + end TypeIdentMethods type TypeSelect = tpd.Select - object TypeSelectTypeTestImpl extends TypeTest[Tree, TypeSelect]: + object TypeSelectTypeTest extends TypeTest[Tree, TypeSelect]: def unapply(x: Tree): Option[TypeSelect & x.type] = x match case tpt: (tpd.Select & x.type) if tpt.isType && tpt.qualifier.isTerm => Some(tpt) case _ => None - end TypeSelectTypeTestImpl + end TypeSelectTypeTest object TypeSelect extends TypeSelectModule: def apply(qualifier: Term, name: String): TypeSelect = @@ -1067,20 +1067,20 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((x.qualifier, x.name.toString)) end TypeSelect - object TypeSelectMethodsImpl extends TypeSelectMethods: + given TypeSelectMethods: TypeSelectMethods with extension (self: TypeSelect): def qualifier: Term = self.qualifier def name: String = self.name.toString end extension - end TypeSelectMethodsImpl + end TypeSelectMethods type TypeProjection = tpd.Select - object TypeProjectionTypeTestImpl extends TypeTest[Tree, TypeProjection]: + object TypeProjectionTypeTest extends TypeTest[Tree, TypeProjection]: def unapply(x: Tree): Option[TypeProjection & x.type] = x match case tpt: (tpd.Select & x.type) if tpt.isType && tpt.qualifier.isType => Some(tpt) case _ => None - end TypeProjectionTypeTestImpl + end TypeProjectionTypeTest object TypeProjection extends TypeProjectionModule: def copy(original: Tree)(qualifier: TypeTree, name: String): TypeProjection = @@ -1089,20 +1089,20 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((x.qualifier, x.name.toString)) end TypeProjection - object TypeProjectionMethodsImpl extends TypeProjectionMethods: + given TypeProjectionMethods: TypeProjectionMethods with extension (self: TypeProjection): def qualifier: TypeTree = self.qualifier def name: String = self.name.toString end extension - end TypeProjectionMethodsImpl + end TypeProjectionMethods type Singleton = tpd.SingletonTypeTree - object SingletonTypeTestImpl extends TypeTest[Tree, Singleton]: + object SingletonTypeTest extends TypeTest[Tree, Singleton]: def unapply(x: Tree): Option[Singleton & x.type] = x match case tpt: (tpd.SingletonTypeTree & x.type) => Some(tpt) case _ => None - end SingletonTypeTestImpl + end SingletonTypeTest object Singleton extends SingletonModule: def apply(ref: Term): Singleton = @@ -1113,19 +1113,19 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some(x.ref) end Singleton - object SingletonMethodsImpl extends SingletonMethods: + given SingletonMethods: SingletonMethods with extension (self: Singleton): def ref: Term = self.ref end extension - end SingletonMethodsImpl + end SingletonMethods type Refined = tpd.RefinedTypeTree - object RefinedTypeTestImpl extends TypeTest[Tree, Refined]: + object RefinedTypeTest extends TypeTest[Tree, Refined]: def unapply(x: Tree): Option[Refined & x.type] = x match case tpt: (tpd.RefinedTypeTree & x.type) => Some(tpt) case _ => None - end RefinedTypeTestImpl + end RefinedTypeTest object Refined extends RefinedModule: def copy(original: Tree)(tpt: TypeTree, refinements: List[Definition]): Refined = @@ -1134,20 +1134,20 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((x.tpt, x.refinements.asInstanceOf[List[Definition]])) end Refined - object RefinedMethodsImpl extends RefinedMethods: + given RefinedMethods: RefinedMethods with extension (self: Refined): def tpt: TypeTree = self.tpt def refinements: List[Definition] = self.refinements.asInstanceOf[List[Definition]] end extension - end RefinedMethodsImpl + end RefinedMethods type Applied = tpd.AppliedTypeTree - object AppliedTypeTestImpl extends TypeTest[Tree, Applied]: + object AppliedTypeTest extends TypeTest[Tree, Applied]: def unapply(x: Tree): Option[Applied & x.type] = x match case tpt: (tpd.AppliedTypeTree & x.type) => Some(tpt) case _ => None - end AppliedTypeTestImpl + end AppliedTypeTest object Applied extends AppliedModule: def apply(tpt: TypeTree, args: List[Tree]): Applied = @@ -1158,20 +1158,20 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((x.tpt, x.args)) end Applied - object AppliedMethodsImpl extends AppliedMethods: + given AppliedMethods: AppliedMethods with extension (self: Applied): def tpt: TypeTree = self.tpt def args: List[Tree] = self.args end extension - end AppliedMethodsImpl + end AppliedMethods type Annotated = tpd.Annotated - object AnnotatedTypeTestImpl extends TypeTest[Tree, Annotated]: + object AnnotatedTypeTest extends TypeTest[Tree, Annotated]: def unapply(x: Tree): Option[Annotated & x.type] = x match case tpt: (tpd.Annotated & x.type) => Some(tpt) case _ => None - end AnnotatedTypeTestImpl + end AnnotatedTypeTest object Annotated extends AnnotatedModule: def apply(arg: TypeTree, annotation: Term): Annotated = @@ -1182,20 +1182,20 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((x.arg, x.annotation)) end Annotated - object AnnotatedMethodsImpl extends AnnotatedMethods: + given AnnotatedMethods: AnnotatedMethods with extension (self: Annotated): def arg: TypeTree = self.arg def annotation: Term = self.annot end extension - end AnnotatedMethodsImpl + end AnnotatedMethods type MatchTypeTree = tpd.MatchTypeTree - object MatchTypeTreeTypeTestImpl extends TypeTest[Tree, MatchTypeTree]: + object MatchTypeTreeTypeTest extends TypeTest[Tree, MatchTypeTree]: def unapply(x: Tree): Option[MatchTypeTree & x.type] = x match case tpt: (tpd.MatchTypeTree & x.type) => Some(tpt) case _ => None - end MatchTypeTreeTypeTestImpl + end MatchTypeTreeTypeTest object MatchTypeTree extends MatchTypeTreeModule: def apply(bound: Option[TypeTree], selector: TypeTree, cases: List[TypeCaseDef]): MatchTypeTree = @@ -1206,21 +1206,21 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((optional(x.bound), x.selector, x.cases)) end MatchTypeTree - object MatchTypeTreeMethodsImpl extends MatchTypeTreeMethods: + given MatchTypeTreeMethods: MatchTypeTreeMethods with extension (self: MatchTypeTree): def bound: Option[TypeTree] = optional(self.bound) def selector: TypeTree = self.selector def cases: List[TypeCaseDef] = self.cases end extension - end MatchTypeTreeMethodsImpl + end MatchTypeTreeMethods type ByName = tpd.ByNameTypeTree - object ByNameTypeTestImpl extends TypeTest[Tree, ByName]: + object ByNameTypeTest extends TypeTest[Tree, ByName]: def unapply(x: Tree): Option[ByName & x.type] = x match case tpt: (tpd.ByNameTypeTree & x.type) => Some(tpt) case _ => None - end ByNameTypeTestImpl + end ByNameTypeTest object ByName extends ByNameModule: def apply(result: TypeTree): ByName = @@ -1231,19 +1231,19 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some(x.result) end ByName - object ByNameMethodsImpl extends ByNameMethods: + given ByNameMethods: ByNameMethods with extension (self: ByName): def result: TypeTree = self.result end extension - end ByNameMethodsImpl + end ByNameMethods type LambdaTypeTree = tpd.LambdaTypeTree - object LambdaTypeTreeTypeTestImpl extends TypeTest[Tree, LambdaTypeTree]: + object LambdaTypeTreeTypeTest extends TypeTest[Tree, LambdaTypeTree]: def unapply(x: Tree): Option[LambdaTypeTree & x.type] = x match case tpt: (tpd.LambdaTypeTree & x.type) => Some(tpt) case _ => None - end LambdaTypeTreeTypeTestImpl + end LambdaTypeTreeTypeTest object LambdaTypeTree extends LambdaTypeTreeModule: def apply(tparams: List[TypeDef], body: Tree): LambdaTypeTree = @@ -1254,20 +1254,20 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((tree.tparams, tree.body)) end LambdaTypeTree - object LambdaTypeTreeMethodsImpl extends LambdaTypeTreeMethods: + given LambdaTypeTreeMethods: LambdaTypeTreeMethods with extension (self: LambdaTypeTree): def tparams: List[TypeDef] = self.tparams def body: Tree = self.body end extension - end LambdaTypeTreeMethodsImpl + end LambdaTypeTreeMethods type TypeBind = tpd.Bind - object TypeBindTypeTestImpl extends TypeTest[Tree, TypeBind]: + object TypeBindTypeTest extends TypeTest[Tree, TypeBind]: def unapply(x: Tree): Option[TypeBind & x.type] = x match case tpt: (tpd.Bind & x.type) if tpt.name.isTypeName => Some(tpt) case _ => None - end TypeBindTypeTestImpl + end TypeBindTypeTest object TypeBind extends TypeBindModule: def copy(original: Tree)(name: String, tpt: Tree): TypeBind = @@ -1276,20 +1276,20 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((x.name.toString, x.body)) end TypeBind - object TypeBindMethodsImpl extends TypeBindMethods: + given TypeBindMethods: TypeBindMethods with extension (self: TypeBind): def name: String = self.name.toString def body: Tree = self.body end extension - end TypeBindMethodsImpl + end TypeBindMethods type TypeBlock = tpd.Block - object TypeBlockTypeTestImpl extends TypeTest[Tree, TypeBlock]: + object TypeBlockTypeTest extends TypeTest[Tree, TypeBlock]: def unapply(x: Tree): Option[TypeBlock & x.type] = x match case tpt: (tpd.Block & x.type) => Some(tpt) case _ => None - end TypeBlockTypeTestImpl + end TypeBlockTypeTest object TypeBlock extends TypeBlockModule: def apply(aliases: List[TypeDef], tpt: TypeTree): TypeBlock = @@ -1300,16 +1300,16 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((x.aliases, x.tpt)) end TypeBlock - object TypeBlockMethodsImpl extends TypeBlockMethods: + given TypeBlockMethods: TypeBlockMethods with extension (self: TypeBlock): def aliases: List[TypeDef] = self.stats.map { case alias: TypeDef => alias } def tpt: TypeTree = self.expr end extension - end TypeBlockMethodsImpl + end TypeBlockMethods type TypeBoundsTree = tpd.TypeBoundsTree | tpd.TypeTree - object TypeBoundsTreeTypeTestImpl extends TypeTest[Tree, TypeBoundsTree]: + object TypeBoundsTreeTypeTest extends TypeTest[Tree, TypeBoundsTree]: def unapply(x: Tree): Option[TypeBoundsTree & x.type] = x match case x: (tpd.TypeBoundsTree & x.type) => Some(x) case x: (tpd.TypeTree & x.type) => @@ -1317,7 +1317,7 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler case tpe: Types.TypeBounds => Some(x) case _ => None case _ => None - end TypeBoundsTreeTypeTestImpl + end TypeBoundsTreeTypeTest object TypeBoundsTree extends TypeBoundsTreeModule: def apply(low: TypeTree, hi: TypeTree): TypeBoundsTree = @@ -1328,7 +1328,7 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((x.low, x.hi)) end TypeBoundsTree - object TypeBoundsTreeMethodsImpl extends TypeBoundsTreeMethods: + given TypeBoundsTreeMethods: TypeBoundsTreeMethods with extension (self: TypeBoundsTree): def tpe: TypeBounds = self.tpe.asInstanceOf[Types.TypeBounds] def low: TypeTree = self match @@ -1338,34 +1338,34 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler case self: tpd.TypeBoundsTree => self.hi case self: tpd.TypeTree => tpd.TypeTree(self.tpe.asInstanceOf[Types.TypeBounds].hi).withSpan(self.span) end extension - end TypeBoundsTreeMethodsImpl + end TypeBoundsTreeMethods type WildcardTypeTree = tpd.Ident - object WildcardTypeTreeTypeTestImpl extends TypeTest[Tree, WildcardTypeTree]: + object WildcardTypeTreeTypeTest extends TypeTest[Tree, WildcardTypeTree]: def unapply(x: Tree): Option[WildcardTypeTree & x.type] = x match case x: (tpd.Ident & x.type) if x.name == nme.WILDCARD => Some(x) case _ => None - end WildcardTypeTreeTypeTestImpl + end WildcardTypeTreeTypeTest object WildcardTypeTree extends WildcardTypeTreeModule: def apply(tpe: TypeRepr): WildcardTypeTree = withDefaultPos(tpd.Underscore(tpe)) def unapply(x: WildcardTypeTree): Boolean = true end WildcardTypeTree - object WildcardTypeTreeMethodsImpl extends WildcardTypeTreeMethods: + given WildcardTypeTreeMethods: WildcardTypeTreeMethods with extension (self: WildcardTypeTree): def tpe: TypeRepr = self.tpe.stripTypeVar end extension - end WildcardTypeTreeMethodsImpl + end WildcardTypeTreeMethods type CaseDef = tpd.CaseDef - object CaseDefTypeTestImpl extends TypeTest[Tree, CaseDef]: + object CaseDefTypeTest extends TypeTest[Tree, CaseDef]: def unapply(x: Tree): Option[CaseDef & x.type] = x match case tree: (tpd.CaseDef & x.type) if tree.body.isTerm => Some(tree) case _ => None - end CaseDefTypeTestImpl + end CaseDefTypeTest object CaseDef extends CaseDefModule: def apply(pattern: Tree, guard: Option[Term], rhs: Term): CaseDef = @@ -1376,21 +1376,21 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((x.pat, optional(x.guard), x.body)) end CaseDef - object CaseDefMethodsImpl extends CaseDefMethods: + given CaseDefMethods: CaseDefMethods with extension (self: CaseDef): def pattern: Tree = self.pat def guard: Option[Term] = optional(self.guard) def rhs: Term = self.body end extension - end CaseDefMethodsImpl + end CaseDefMethods type TypeCaseDef = tpd.CaseDef - object TypeCaseDefTypeTestImpl extends TypeTest[Tree, TypeCaseDef]: + object TypeCaseDefTypeTest extends TypeTest[Tree, TypeCaseDef]: def unapply(x: Tree): Option[TypeCaseDef & x.type] = x match case tree: (tpd.CaseDef & x.type) if tree.body.isType => Some(tree) case _ => None - end TypeCaseDefTypeTestImpl + end TypeCaseDefTypeTest object TypeCaseDef extends TypeCaseDefModule: def apply(pattern: TypeTree, rhs: TypeTree): TypeCaseDef = @@ -1401,20 +1401,20 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((tree.pat, tree.body)) end TypeCaseDef - object TypeCaseDefMethodsImpl extends TypeCaseDefMethods: + given TypeCaseDefMethods: TypeCaseDefMethods with extension (self: TypeCaseDef): def pattern: TypeTree = self.pat def rhs: TypeTree = self.body end extension - end TypeCaseDefMethodsImpl + end TypeCaseDefMethods type Bind = tpd.Bind - object BindTypeTestImpl extends TypeTest[Tree, Bind]: + object BindTypeTest extends TypeTest[Tree, Bind]: def unapply(x: Tree): Option[Bind & x.type] = x match case x: (tpd.Bind & x.type) if x.name.isTermName => Some(x) case _ => None - end BindTypeTestImpl + end BindTypeTest object Bind extends BindModule: def apply(sym: Symbol, pattern: Tree): Bind = @@ -1425,22 +1425,22 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((pattern.name.toString, pattern.pattern)) end Bind - object BindMethodsImpl extends BindMethods: + given BindMethods: BindMethods with extension (self: Bind): def name: String = self.name.toString def pattern: Tree = self.body end extension - end BindMethodsImpl + end BindMethods type Unapply = tpd.UnApply | tpd.Typed // tpd.Typed containing a tpd.UnApply as expression - object UnapplyTypeTestImpl extends TypeTest[Tree, Unapply]: + object UnapplyTypeTest extends TypeTest[Tree, Unapply]: def unapply(x: Tree): Option[Unapply & x.type] = x match // keep in sync with UnapplyMethodsImpl.selfUnApply case x: (tpd.UnApply & x.type) => Some(x) case x: (tpd.Typed & x.type) if x.expr.isInstanceOf[tpd.UnApply] => Some(x) case _ => None - end UnapplyTypeTestImpl + end UnapplyTypeTest object Unapply extends UnapplyModule: def copy(original: Tree)(fun: Term, implicits: List[Term], patterns: List[Tree]): Unapply = @@ -1449,7 +1449,7 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((x.fun, x.implicits, x.patterns)) end Unapply - object UnapplyMethodsImpl extends UnapplyMethods: + given UnapplyMethods: UnapplyMethods with extension (self: Unapply): def fun: Term = selfUnApply(self).fun def implicits: List[Term] = selfUnApply(self).implicits @@ -1463,15 +1463,15 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler patterns match case patterns0 :+ dotc.ast.Trees.SeqLiteral(elems, _) => patterns0 ::: elems case _ => patterns - end UnapplyMethodsImpl + end UnapplyMethods type Alternatives = tpd.Alternative - object AlternativesTypeTestImpl extends TypeTest[Tree, Alternatives]: + object AlternativesTypeTest extends TypeTest[Tree, Alternatives]: def unapply(x: Tree): Option[Alternatives & x.type] = x match case x: (tpd.Alternative & x.type) => Some(x) case _ => None - end AlternativesTypeTestImpl + end AlternativesTypeTest object Alternatives extends AlternativesModule: def apply(patterns: List[Tree]): Alternatives = @@ -1482,11 +1482,11 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some(x.patterns) end Alternatives - object AlternativesMethodsImpl extends AlternativesMethods: + given AlternativesMethods: AlternativesMethods with extension (self: Alternatives): def patterns: List[Tree] = self.trees end extension - end AlternativesMethodsImpl + end AlternativesMethods type Selector = untpd.ImportSelector @@ -1494,47 +1494,47 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler type SimpleSelector = untpd.ImportSelector - object SimpleSelectorTypeTestImpl extends TypeTest[Selector, SimpleSelector]: + object SimpleSelectorTypeTest extends TypeTest[Selector, SimpleSelector]: def unapply(x: Selector): Option[SimpleSelector & x.type] = x match case x: (untpd.ImportSelector & x.type) if x.renamed.isEmpty && !x.isGiven => Some(x) case _ => None // TODO: handle import bounds - end SimpleSelectorTypeTestImpl + end SimpleSelectorTypeTest object SimpleSelector extends SimpleSelectorModule: def unapply(x: SimpleSelector): Option[String] = Some(x.name.toString) end SimpleSelector - object SimpleSelectorMethodsImpl extends SimpleSelectorMethods: + given SimpleSelectorMethods: SimpleSelectorMethods with extension (self: SimpleSelector): def name: String = self.imported.name.toString def namePos: Position = self.imported.sourcePos end extension - end SimpleSelectorMethodsImpl + end SimpleSelectorMethods type RenameSelector = untpd.ImportSelector - object RenameSelectorTypeTestImpl extends TypeTest[Selector, RenameSelector]: + object RenameSelectorTypeTest extends TypeTest[Selector, RenameSelector]: def unapply(x: Selector): Option[RenameSelector & x.type] = x match case x: (untpd.ImportSelector & x.type) if !x.renamed.isEmpty => Some(x) case _ => None - end RenameSelectorTypeTestImpl + end RenameSelectorTypeTest object RenameSelector extends RenameSelectorModule: def unapply(x: RenameSelector): Option[(String, String)] = Some((x.fromName, x.toName)) end RenameSelector - object RenameSelectorMethodsImpl extends RenameSelectorMethods: + given RenameSelectorMethods: RenameSelectorMethods with extension (self: RenameSelector): def fromName: String = self.imported.name.toString def fromPos: Position = self.imported.sourcePos def toName: String = self.renamed.asInstanceOf[untpd.Ident].name.toString def toPos: Position = self.renamed.asInstanceOf[untpd.Ident].sourcePos end extension - end RenameSelectorMethodsImpl + end RenameSelectorMethods type OmitSelector = untpd.ImportSelector - object OmitSelectorTypeTestImpl extends TypeTest[Selector, OmitSelector]: + object OmitSelectorTypeTest extends TypeTest[Selector, OmitSelector]: def unapply(x: Selector): Option[OmitSelector & x.type] = x match { case self: (untpd.ImportSelector & x.type) => self.renamed match @@ -1542,41 +1542,41 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler case _ => None case _ => None } - end OmitSelectorTypeTestImpl + end OmitSelectorTypeTest object OmitSelector extends OmitSelectorModule: def unapply(x: OmitSelector): Option[String] = Some(x.imported.name.toString) end OmitSelector - object OmitSelectorMethodsImpl extends OmitSelectorMethods: + given OmitSelectorMethods: OmitSelectorMethods with extension (self: OmitSelector): def name: String = self.imported.toString def namePos: Position = self.imported.sourcePos end extension - end OmitSelectorMethodsImpl + end OmitSelectorMethods type GivenSelector = untpd.ImportSelector - object GivenSelectorTypeTestImpl extends TypeTest[Selector, GivenSelector]: + object GivenSelectorTypeTest extends TypeTest[Selector, GivenSelector]: def unapply(x: Selector): Option[GivenSelector & x.type] = x match { case self: (untpd.ImportSelector & x.type) if x.isGiven => Some(self) case _ => None } - end GivenSelectorTypeTestImpl + end GivenSelectorTypeTest object GivenSelector extends GivenSelectorModule: def unapply(x: GivenSelector): Option[Option[TypeTree]] = - Some(GivenSelectorMethodsImpl.bound(x)) + Some(GivenSelectorMethods.bound(x)) end GivenSelector - object GivenSelectorMethodsImpl extends GivenSelectorMethods: + given GivenSelectorMethods: GivenSelectorMethods with extension (self: GivenSelector): def bound: Option[TypeTree] = self.bound match case untpd.TypedSplice(tpt) => Some(tpt) case _ => None end extension - end GivenSelectorMethodsImpl + end GivenSelectorMethods type TypeRepr = dotc.core.Types.Type @@ -1605,7 +1605,7 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler dotc.core.Symbols.getClassIfDefined(clazz.getCanonicalName).typeRef end TypeRepr - object TypeReprMethodsImpl extends TypeReprMethods: + given TypeReprMethods: TypeReprMethods with extension (self: TypeRepr): def showExtractors: String = Extractors.showType(using QuotesImpl.this)(self) @@ -1657,32 +1657,32 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler def appliedTo(targs: List[TypeRepr]): TypeRepr = dotc.core.Types.decorateTypeApplications(self).appliedTo(targs) end extension - end TypeReprMethodsImpl + end TypeReprMethods type ConstantType = dotc.core.Types.ConstantType - object ConstantTypeTypeTestImpl extends TypeTest[TypeRepr, ConstantType]: + object ConstantTypeTypeTest extends TypeTest[TypeRepr, ConstantType]: def unapply(x: TypeRepr): Option[ConstantType & x.type] = x match case tpe: (Types.ConstantType & x.type) => Some(tpe) case _ => None - end ConstantTypeTypeTestImpl + end ConstantTypeTypeTest object ConstantType extends ConstantTypeModule: def apply(const: Constant): ConstantType = Types.ConstantType(const) def unapply(x: ConstantType): Option[Constant] = Some(x.constant) end ConstantType - object ConstantTypeMethodsImpl extends ConstantTypeMethods: + given ConstantTypeMethods: ConstantTypeMethods with extension (self: ConstantType) def constant: Constant = self.value - end ConstantTypeMethodsImpl + end ConstantTypeMethods type TermRef = dotc.core.Types.NamedType - object TermRefTypeTestImpl extends TypeTest[TypeRepr, TermRef]: + object TermRefTypeTest extends TypeTest[TypeRepr, TermRef]: def unapply(x: TypeRepr): Option[TermRef & x.type] = x match case tpe: (Types.TermRef & x.type) => Some(tpe) case _ => None - end TermRefTypeTestImpl + end TermRefTypeTest object TermRef extends TermRefModule: def apply(qual: TypeRepr, name: String): TermRef = @@ -1691,42 +1691,42 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((x.prefix, x.name.toString)) end TermRef - object TermRefMethodsImpl extends TermRefMethods: + given TermRefMethods: TermRefMethods with extension (self: TermRef): def qualifier: TypeRepr = self.prefix def name: String = self.name.toString end extension - end TermRefMethodsImpl + end TermRefMethods type TypeRef = dotc.core.Types.NamedType - object TypeRefTypeTestImpl extends TypeTest[TypeRepr, TypeRef]: + object TypeRefTypeTest extends TypeTest[TypeRepr, TypeRef]: def unapply(x: TypeRepr): Option[TypeRef & x.type] = x match case tpe: (Types.TypeRef & x.type) => Some(tpe) case _ => None - end TypeRefTypeTestImpl + end TypeRefTypeTest object TypeRef extends TypeRefModule: def unapply(x: TypeRef): Option[(TypeRepr, String)] = Some((x.prefix, x.name.toString)) end TypeRef - object TypeRefMethodsImpl extends TypeRefMethods: + given TypeRefMethods: TypeRefMethods with extension (self: TypeRef): def qualifier: TypeRepr = self.prefix def name: String = self.name.toString def isOpaqueAlias: Boolean = self.symbol.isOpaqueAlias def translucentSuperType: TypeRepr = self.translucentSuperType end extension - end TypeRefMethodsImpl + end TypeRefMethods type SuperType = dotc.core.Types.SuperType - object SuperTypeTypeTestImpl extends TypeTest[TypeRepr, SuperType]: + object SuperTypeTypeTest extends TypeTest[TypeRepr, SuperType]: def unapply(x: TypeRepr): Option[SuperType & x.type] = x match case tpe: (Types.SuperType & x.type) => Some(tpe) case _ => None - end SuperTypeTypeTestImpl + end SuperTypeTypeTest object SuperType extends SuperTypeModule: def apply(thistpe: TypeRepr, supertpe: TypeRepr): SuperType = @@ -1735,20 +1735,20 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((x.thistpe, x.supertpe)) end SuperType - object SuperTypeMethodsImpl extends SuperTypeMethods: + given SuperTypeMethods: SuperTypeMethods with extension (self: SuperType): def thistpe: TypeRepr = self.thistpe def supertpe: TypeRepr = self.thistpe end extension - end SuperTypeMethodsImpl + end SuperTypeMethods type Refinement = dotc.core.Types.RefinedType - object RefinementTypeTestImpl extends TypeTest[TypeRepr, Refinement]: + object RefinementTypeTest extends TypeTest[TypeRepr, Refinement]: def unapply(x: TypeRepr): Option[Refinement & x.type] = x match case tpe: (Types.RefinedType & x.type) => Some(tpe) case _ => None - end RefinementTypeTestImpl + end RefinementTypeTest object Refinement extends RefinementModule: def apply(parent: TypeRepr, name: String, info: TypeRepr): Refinement = @@ -1761,41 +1761,41 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((x.parent, x.name, x.info)) end Refinement - object RefinementMethodsImpl extends RefinementMethods: + given RefinementMethods: RefinementMethods with extension (self: Refinement): def parent: TypeRepr = self.parent def name: String = self.refinedName.toString def info: TypeRepr = self.refinedInfo end extension - end RefinementMethodsImpl + end RefinementMethods type AppliedType = dotc.core.Types.AppliedType - object AppliedTypeTypeTestImpl extends TypeTest[TypeRepr, AppliedType]: + object AppliedTypeTypeTest extends TypeTest[TypeRepr, AppliedType]: def unapply(x: TypeRepr): Option[AppliedType & x.type] = x match case tpe: (Types.AppliedType & x.type) => Some(tpe) case _ => None - end AppliedTypeTypeTestImpl + end AppliedTypeTypeTest object AppliedType extends AppliedTypeModule: def unapply(x: AppliedType): Option[(TypeRepr, List[TypeRepr])] = Some((x.tycon, x.args)) end AppliedType - object AppliedTypeMethodsImpl extends AppliedTypeMethods: + given AppliedTypeMethods: AppliedTypeMethods with extension (self: AppliedType): def tycon: TypeRepr = self.tycon def args: List[TypeRepr] = self.args end extension - end AppliedTypeMethodsImpl + end AppliedTypeMethods type AnnotatedType = dotc.core.Types.AnnotatedType - object AnnotatedTypeTypeTestImpl extends TypeTest[TypeRepr, AnnotatedType]: + object AnnotatedTypeTypeTest extends TypeTest[TypeRepr, AnnotatedType]: def unapply(x: TypeRepr): Option[AnnotatedType & x.type] = x match case tpe: (Types.AnnotatedType & x.type) => Some(tpe) case _ => None - end AnnotatedTypeTypeTestImpl + end AnnotatedTypeTypeTest object AnnotatedType extends AnnotatedTypeModule: def apply(underlying: TypeRepr, annot: Term): AnnotatedType = @@ -1804,60 +1804,60 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((x.underlying.stripTypeVar, x.annot.tree)) end AnnotatedType - object AnnotatedTypeMethodsImpl extends AnnotatedTypeMethods: + given AnnotatedTypeMethods: AnnotatedTypeMethods with extension (self: AnnotatedType): def underlying: TypeRepr = self.underlying.stripTypeVar def annot: Term = self.annot.tree end extension - end AnnotatedTypeMethodsImpl + end AnnotatedTypeMethods type AndType = dotc.core.Types.AndType - object AndTypeTypeTestImpl extends TypeTest[TypeRepr, AndType]: + object AndTypeTypeTest extends TypeTest[TypeRepr, AndType]: def unapply(x: TypeRepr): Option[AndType & x.type] = x match case tpe: (Types.AndType & x.type) => Some(tpe) case _ => None - end AndTypeTypeTestImpl + end AndTypeTypeTest object AndType extends AndTypeModule: def apply(lhs: TypeRepr, rhs: TypeRepr): AndType = Types.AndType(lhs, rhs) def unapply(x: AndType): Option[(TypeRepr, TypeRepr)] = Some((x.left, x.right)) end AndType - object AndTypeMethodsImpl extends AndTypeMethods: + given AndTypeMethods: AndTypeMethods with extension (self: AndType): def left: TypeRepr = self.tp1.stripTypeVar def right: TypeRepr = self.tp2.stripTypeVar end extension - end AndTypeMethodsImpl + end AndTypeMethods type OrType = dotc.core.Types.OrType - object OrTypeTypeTestImpl extends TypeTest[TypeRepr, OrType]: + object OrTypeTypeTest extends TypeTest[TypeRepr, OrType]: def unapply(x: TypeRepr): Option[OrType & x.type] = x match case tpe: (Types.OrType & x.type) => Some(tpe) case _ => None - end OrTypeTypeTestImpl + end OrTypeTypeTest object OrType extends OrTypeModule: def apply(lhs: TypeRepr, rhs: TypeRepr): OrType = Types.OrType(lhs, rhs, soft = false) def unapply(x: OrType): Option[(TypeRepr, TypeRepr)] = Some((x.left, x.right)) end OrType - object OrTypeMethodsImpl extends OrTypeMethods: + given OrTypeMethods: OrTypeMethods with extension (self: OrType): def left: TypeRepr = self.tp1.stripTypeVar def right: TypeRepr = self.tp2.stripTypeVar end extension - end OrTypeMethodsImpl + end OrTypeMethods type MatchType = dotc.core.Types.MatchType - object MatchTypeTypeTestImpl extends TypeTest[TypeRepr, MatchType]: + object MatchTypeTypeTest extends TypeTest[TypeRepr, MatchType]: def unapply(x: TypeRepr): Option[MatchType & x.type] = x match case tpe: (Types.MatchType & x.type) => Some(tpe) case _ => None - end MatchTypeTypeTestImpl + end MatchTypeTypeTest object MatchType extends MatchTypeModule: def apply(bound: TypeRepr, scrutinee: TypeRepr, cases: List[TypeRepr]): MatchType = @@ -1866,98 +1866,98 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((x.bound, x.scrutinee, x.cases)) end MatchType - object MatchTypeMethodsImpl extends MatchTypeMethods: + given MatchTypeMethods: MatchTypeMethods with extension (self: MatchType): def bound: TypeRepr = self.bound def scrutinee: TypeRepr = self.scrutinee def cases: List[TypeRepr] = self.cases end extension - end MatchTypeMethodsImpl + end MatchTypeMethods type ByNameType = dotc.core.Types.ExprType - object ByNameTypeTypeTestImpl extends TypeTest[TypeRepr, ByNameType]: + object ByNameTypeTypeTest extends TypeTest[TypeRepr, ByNameType]: def unapply(x: TypeRepr): Option[ByNameType & x.type] = x match case tpe: (Types.ExprType & x.type) => Some(tpe) case _ => None - end ByNameTypeTypeTestImpl + end ByNameTypeTypeTest object ByNameType extends ByNameTypeModule: def apply(underlying: TypeRepr): TypeRepr = Types.ExprType(underlying) def unapply(x: ByNameType): Option[TypeRepr] = Some(x.underlying) end ByNameType - object ByNameTypeMethodsImpl extends ByNameTypeMethods: + given ByNameTypeMethods: ByNameTypeMethods with extension (self: ByNameType): def underlying: TypeRepr = self.resType.stripTypeVar end extension - end ByNameTypeMethodsImpl + end ByNameTypeMethods type ParamRef = dotc.core.Types.ParamRef - object ParamRefTypeTestImpl extends TypeTest[TypeRepr, ParamRef]: + object ParamRefTypeTest extends TypeTest[TypeRepr, ParamRef]: def unapply(x: TypeRepr): Option[ParamRef & x.type] = x match case tpe: (Types.TypeParamRef & x.type) => Some(tpe) case tpe: (Types.TermParamRef & x.type) => Some(tpe) case _ => None - end ParamRefTypeTestImpl + end ParamRefTypeTest object ParamRef extends ParamRefModule: def unapply(x: ParamRef): Option[(LambdaType, Int)] = Some((x.binder, x.paramNum)) end ParamRef - object ParamRefMethodsImpl extends ParamRefMethods: + given ParamRefMethods: ParamRefMethods with extension (self: ParamRef): def binder: LambdaType = self.binder.asInstanceOf[LambdaType] // Cast to tpd def paramNum: Int = self.paramNum end extension - end ParamRefMethodsImpl + end ParamRefMethods type ThisType = dotc.core.Types.ThisType - object ThisTypeTypeTestImpl extends TypeTest[TypeRepr, ThisType]: + object ThisTypeTypeTest extends TypeTest[TypeRepr, ThisType]: def unapply(x: TypeRepr): Option[ThisType & x.type] = x match case tpe: (Types.ThisType & x.type) => Some(tpe) case _ => None - end ThisTypeTypeTestImpl + end ThisTypeTypeTest object ThisType extends ThisTypeModule: def unapply(x: ThisType): Option[TypeRepr] = Some(x.tref) end ThisType - object ThisTypeMethodsImpl extends ThisTypeMethods: + given ThisTypeMethods: ThisTypeMethods with extension (self: ThisType): def tref: TypeRepr = self.tref end extension - end ThisTypeMethodsImpl + end ThisTypeMethods type RecursiveThis = dotc.core.Types.RecThis - object RecursiveThisTypeTestImpl extends TypeTest[TypeRepr, RecursiveThis]: + object RecursiveThisTypeTest extends TypeTest[TypeRepr, RecursiveThis]: def unapply(x: TypeRepr): Option[RecursiveThis & x.type] = x match case tpe: (Types.RecThis & x.type) => Some(tpe) case _ => None - end RecursiveThisTypeTestImpl + end RecursiveThisTypeTest object RecursiveThis extends RecursiveThisModule: def unapply(x: RecursiveThis): Option[RecursiveType] = Some(x.binder) end RecursiveThis - object RecursiveThisMethodsImpl extends RecursiveThisMethods: + given RecursiveThisMethods: RecursiveThisMethods with extension (self: RecursiveThis): def binder: RecursiveType = self.binder end extension - end RecursiveThisMethodsImpl + end RecursiveThisMethods type RecursiveType = dotc.core.Types.RecType - object RecursiveTypeTypeTestImpl extends TypeTest[TypeRepr, RecursiveType]: + object RecursiveTypeTypeTest extends TypeTest[TypeRepr, RecursiveType]: def unapply(x: TypeRepr): Option[RecursiveType & x.type] = x match case tpe: (Types.RecType & x.type) => Some(tpe) case _ => None - end RecursiveTypeTypeTestImpl + end RecursiveTypeTypeTest object RecursiveType extends RecursiveTypeModule: def apply(parentExp: RecursiveType => TypeRepr): RecursiveType = @@ -1965,22 +1965,22 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler def unapply(x: RecursiveType): Option[TypeRepr] = Some(x.underlying) end RecursiveType - object RecursiveTypeMethodsImpl extends RecursiveTypeMethods: + given RecursiveTypeMethods: RecursiveTypeMethods with extension (self: RecursiveType): def underlying: TypeRepr = self.underlying.stripTypeVar def recThis: RecursiveThis = self.recThis end extension - end RecursiveTypeMethodsImpl + end RecursiveTypeMethods type LambdaType = dotc.core.Types.LambdaType type MethodType = dotc.core.Types.MethodType - object MethodTypeTypeTestImpl extends TypeTest[TypeRepr, MethodType]: + object MethodTypeTypeTest extends TypeTest[TypeRepr, MethodType]: def unapply(x: TypeRepr): Option[MethodType & x.type] = x match case tpe: (Types.MethodType & x.type) => Some(tpe) case _ => None - end MethodTypeTypeTestImpl + end MethodTypeTypeTest object MethodType extends MethodTypeModule: def apply(paramNames: List[String])(paramInfosExp: MethodType => List[TypeRepr], resultTypeExp: MethodType => TypeRepr): MethodType = @@ -1989,7 +1989,7 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((x.paramNames.map(_.toString), x.paramTypes, x.resType)) end MethodType - object MethodTypeMethodsImpl extends MethodTypeMethods: + given MethodTypeMethods: MethodTypeMethods with extension (self: MethodType): def isErased: Boolean = self.isErasedMethod def isImplicit: Boolean = self.isImplicitMethod @@ -1998,15 +1998,15 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler def paramTypes: List[TypeRepr] = self.paramInfos def resType: TypeRepr = self.resType end extension - end MethodTypeMethodsImpl + end MethodTypeMethods type PolyType = dotc.core.Types.PolyType - object PolyTypeTypeTestImpl extends TypeTest[TypeRepr, PolyType]: + object PolyTypeTypeTest extends TypeTest[TypeRepr, PolyType]: def unapply(x: TypeRepr): Option[PolyType & x.type] = x match case tpe: (Types.PolyType & x.type) => Some(tpe) case _ => None - end PolyTypeTypeTestImpl + end PolyTypeTypeTest object PolyType extends PolyTypeModule: def apply(paramNames: List[String])(paramBoundsExp: PolyType => List[TypeBounds], resultTypeExp: PolyType => TypeRepr): PolyType = @@ -2015,22 +2015,22 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((x.paramNames.map(_.toString), x.paramBounds, x.resType)) end PolyType - object PolyTypeMethodsImpl extends PolyTypeMethods: + given PolyTypeMethods: PolyTypeMethods with extension (self: PolyType): def param(idx: Int): TypeRepr = self.newParamRef(idx) def paramNames: List[String] = self.paramNames.map(_.toString) def paramBounds: List[TypeBounds] = self.paramInfos def resType: TypeRepr = self.resType end extension - end PolyTypeMethodsImpl + end PolyTypeMethods type TypeLambda = dotc.core.Types.TypeLambda - object TypeLambdaTypeTestImpl extends TypeTest[TypeRepr, TypeLambda]: + object TypeLambdaTypeTest extends TypeTest[TypeRepr, TypeLambda]: def unapply(x: TypeRepr): Option[TypeLambda & x.type] = x match case tpe: (Types.TypeLambda & x.type) => Some(tpe) case _ => None - end TypeLambdaTypeTestImpl + end TypeLambdaTypeTest object TypeLambda extends TypeLambdaModule: def apply(paramNames: List[String], boundsFn: TypeLambda => List[TypeBounds], bodyFn: TypeLambda => TypeRepr): TypeLambda = @@ -2039,22 +2039,22 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((x.paramNames.map(_.toString), x.paramBounds, x.resType)) end TypeLambda - object TypeLambdaMethodsImpl extends TypeLambdaMethods: + given TypeLambdaMethods: TypeLambdaMethods with extension (self: TypeLambda): def paramNames: List[String] = self.paramNames.map(_.toString) def paramBounds: List[TypeBounds] = self.paramInfos def param(idx: Int): TypeRepr = self.newParamRef(idx) def resType: TypeRepr = self.resType end extension - end TypeLambdaMethodsImpl + end TypeLambdaMethods type TypeBounds = dotc.core.Types.TypeBounds - object TypeBoundsTypeTestImpl extends TypeTest[TypeRepr, TypeBounds]: + object TypeBoundsTypeTest extends TypeTest[TypeRepr, TypeBounds]: def unapply(x: TypeRepr): Option[TypeBounds & x.type] = x match case x: (Types.TypeBounds & x.type) => Some(x) case _ => None - end TypeBoundsTypeTestImpl + end TypeBoundsTypeTest object TypeBounds extends TypeBoundsModule: def apply(low: TypeRepr, hi: TypeRepr): TypeBounds = Types.TypeBounds(low, hi) @@ -2064,19 +2064,19 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler def lower(lo: TypeRepr): TypeBounds = Types .TypeBounds.lower(lo) end TypeBounds - object TypeBoundsMethodsImpl extends TypeBoundsMethods: + given TypeBoundsMethods: TypeBoundsMethods with extension (self: TypeBounds): def low: TypeRepr = self.lo.stripLazyRef def hi: TypeRepr = self.hi.stripLazyRef end extension - end TypeBoundsMethodsImpl + end TypeBoundsMethods type NoPrefix = dotc.core.Types.NoPrefix.type - object NoPrefixTypeTestImpl extends TypeTest[TypeRepr, NoPrefix]: + object NoPrefixTypeTest extends TypeTest[TypeRepr, NoPrefix]: def unapply(x: TypeRepr): Option[NoPrefix & x.type] = if x == Types.NoPrefix then Some(x.asInstanceOf[NoPrefix & x.type]) else None - end NoPrefixTypeTestImpl + end NoPrefixTypeTest object NoPrefix extends NoPrefixModule: def unapply(x: NoPrefix): Boolean = true @@ -2172,7 +2172,7 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler end Constant - object ConstantMethodsImpl extends ConstantMethods: + given ConstantMethods: ConstantMethods with extension (self: Constant): def value: Any = self.value def showExtractors: String = @@ -2184,7 +2184,7 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler def showAnsiColored: String = SourceCode.showConstant(using QuotesImpl.this)(self)(SyntaxHighlight.ANSI, fullNames = true) end extension - end ConstantMethodsImpl + end ConstantMethods object Implicits extends ImplicitsModule: def search(tpe: TypeRepr): ImplicitSearchResult = @@ -2195,61 +2195,61 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler type ImplicitSearchSuccess = Tree - object ImplicitSearchSuccessTypeTestImpl extends TypeTest[ImplicitSearchResult, ImplicitSearchSuccess]: + object ImplicitSearchSuccessTypeTest extends TypeTest[ImplicitSearchResult, ImplicitSearchSuccess]: def unapply(x: ImplicitSearchResult): Option[ImplicitSearchSuccess & x.type] = x.tpe match case _: dotc.typer.Implicits.SearchFailureType => None case _ => Some(x) - end ImplicitSearchSuccessTypeTestImpl + end ImplicitSearchSuccessTypeTest - object ImplicitSearchSuccessMethodsImpl extends ImplicitSearchSuccessMethods: + given ImplicitSearchSuccessMethods: ImplicitSearchSuccessMethods with extension (self: ImplicitSearchSuccess): def tree: Term = self end extension - end ImplicitSearchSuccessMethodsImpl + end ImplicitSearchSuccessMethods type ImplicitSearchFailure = Tree - object ImplicitSearchFailureTypeTestImpl extends TypeTest[ImplicitSearchResult, ImplicitSearchFailure]: + object ImplicitSearchFailureTypeTest extends TypeTest[ImplicitSearchResult, ImplicitSearchFailure]: def unapply(x: ImplicitSearchResult): Option[ImplicitSearchFailure & x.type] = x.tpe match case _: dotc.typer.Implicits.SearchFailureType => Some(x) case _ => None - end ImplicitSearchFailureTypeTestImpl + end ImplicitSearchFailureTypeTest - object ImplicitSearchFailureMethodsImpl extends ImplicitSearchFailureMethods: + given ImplicitSearchFailureMethods: ImplicitSearchFailureMethods with extension (self: ImplicitSearchFailure): def explanation: String = self.tpe.asInstanceOf[dotc.typer.Implicits.SearchFailureType].explanation end extension - end ImplicitSearchFailureMethodsImpl + end ImplicitSearchFailureMethods type DivergingImplicit = Tree - object DivergingImplicitTypeTestImpl extends TypeTest[ImplicitSearchResult, DivergingImplicit]: + object DivergingImplicitTypeTest extends TypeTest[ImplicitSearchResult, DivergingImplicit]: def unapply(x: ImplicitSearchResult): Option[DivergingImplicit & x.type] = x.tpe match case _: dotc.typer.Implicits.DivergingImplicit => Some(x) case _ => None - end DivergingImplicitTypeTestImpl + end DivergingImplicitTypeTest type NoMatchingImplicits = Tree - object NoMatchingImplicitsTypeTestImpl extends TypeTest[ImplicitSearchResult, NoMatchingImplicits]: + object NoMatchingImplicitsTypeTest extends TypeTest[ImplicitSearchResult, NoMatchingImplicits]: def unapply(x: ImplicitSearchResult): Option[NoMatchingImplicits & x.type] = x.tpe match case _: dotc.typer.Implicits.NoMatchingImplicits => Some(x) case _ => None - end NoMatchingImplicitsTypeTestImpl + end NoMatchingImplicitsTypeTest type AmbiguousImplicits = Tree - object AmbiguousImplicitsTypeTestImpl extends TypeTest[ImplicitSearchResult, AmbiguousImplicits]: + object AmbiguousImplicitsTypeTest extends TypeTest[ImplicitSearchResult, AmbiguousImplicits]: def unapply(x: ImplicitSearchResult): Option[AmbiguousImplicits & x.type] = x.tpe match case _: dotc.typer.Implicits.AmbiguousImplicits => Some(x) case _ => None - end AmbiguousImplicitsTypeTestImpl + end AmbiguousImplicitsTypeTest type Symbol = dotc.core.Symbols.Symbol @@ -2271,7 +2271,7 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler def noSymbol: Symbol = dotc.core.Symbols.NoSymbol end Symbol - object SymbolMethodsImpl extends SymbolMethods: + given SymbolMethods: SymbolMethods with extension (self: Symbol): def owner: Symbol = self.denot.owner def maybeOwner: Symbol = self.denot.maybeOwner @@ -2401,7 +2401,7 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler private def isField(sym: Symbol): Boolean = sym.isTerm && !sym.is(dotc.core.Flags.Method) - end SymbolMethodsImpl + end SymbolMethods type Signature = dotc.core.Signature @@ -2410,7 +2410,7 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler Some((sig.paramSigs, sig.resultSig)) end Signature - object SignatureMethodsImpl extends SignatureMethods: + given SignatureMethods: SignatureMethods with extension (self: Signature): def paramSigs: List[String | Int] = self.paramsSig.map { @@ -2422,7 +2422,7 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler def resultSig: String = self.resSig.toString end extension - end SignatureMethodsImpl + end SignatureMethods object defn extends defnModule: def RootPackage: Symbol = dotc.core.Symbols.defn.RootPackage @@ -2523,7 +2523,7 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler def Transparent: Flags = dotc.core.Flags.Transparent end Flags - object FlagsMethodsImpl extends FlagsMethods: + given FlagsMethods: FlagsMethods with extension (self: Flags): def is(that: Flags): Boolean = self.isAllOf(that) def |(that: Flags): Flags = dotc.core.Flags.or(self, that) // TODO: Replace with dotc.core.Flags.|(self)(that) once extension names have stabilized @@ -2535,7 +2535,7 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler def showAnsiColored: String = SourceCode.showFlags(using QuotesImpl.this)(self)(SyntaxHighlight.ANSI) end extension - end FlagsMethodsImpl + end FlagsMethods type Position = dotc.util.SourcePosition @@ -2546,7 +2546,7 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler dotc.util.SourcePosition(sourceFile, dotc.util.Spans.Span(start, end)) end Position - object PositionMethodsImpl extends PositionMethods: + given PositionMethods: PositionMethods with extension (self: Position): def start: Int = self.start def end: Int = self.end @@ -2560,7 +2560,7 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler // TODO detect when we do not have a source and return None Some(new String(self.source.content(), self.start, self.end - self.start)) end extension - end PositionMethodsImpl + end PositionMethods type SourceFile = dotc.util.SourceFile @@ -2568,14 +2568,14 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler def current: SourceFile = ctx.compilationUnit.source } - object SourceFileMethodsImpl extends SourceFileMethods: + given SourceFileMethods: SourceFileMethods with extension (self: SourceFile): def jpath: java.nio.file.Path = self.file.jpath def content: Option[String] = // TODO detect when we do not have a source and return None Some(new String(self.content())) end extension - end SourceFileMethodsImpl + end SourceFileMethods object report extends reportModule: @@ -2615,14 +2615,14 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler object Documentation extends DocumentationModule - object DocumentationMethodsImpl extends DocumentationMethods: + given DocumentationMethods: DocumentationMethods with extension (self: Documentation): def raw: String = self.raw def expanded: Option[String] = self.expanded def usecases: List[(String, Option[DefDef])] = self.usecases.map { uc => (uc.code, uc.tpdCode) } end extension - end DocumentationMethodsImpl + end DocumentationMethods private def optional[T <: dotc.ast.Trees.Tree[?]](tree: T): Option[tree.type] = if tree.isEmpty then None else Some(tree) diff --git a/library/src/scala/quoted/Quotes.scala b/library/src/scala/quoted/Quotes.scala index 8c8a324af7a8..2fd65026b06d 100644 --- a/library/src/scala/quoted/Quotes.scala +++ b/library/src/scala/quoted/Quotes.scala @@ -201,10 +201,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `Tree` available without any imports */ - given TreeMethods: TreeMethods = TreeMethodsImpl - - /** Implementation of extension methods on `Tree` */ - protected val TreeMethodsImpl: TreeMethods + given TreeMethods: TreeMethods /** Extension methods of `Tree` */ trait TreeMethods { @@ -250,10 +247,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type PackageClause <: Tree /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `PackageClause` */ - given PackageClauseTypeTest: TypeTest[Tree, PackageClause] = PackageClauseTypeTestImpl - - /** Implementation of `PackageClauseTypeTest` */ - protected val PackageClauseTypeTestImpl: TypeTest[Tree, PackageClause] + given PackageClauseTypeTest: TypeTest[Tree, PackageClause] /** Module object of `type PackageClause` */ val PackageClause: PackageClauseModule @@ -266,10 +260,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `PackageClause` available without any imports */ - given PackageClauseMethods: PackageClauseMethods = PackageClauseMethodsImpl - - /** Implementation of extension methods on `PackageClause` */ - protected val PackageClauseMethodsImpl: PackageClauseMethods + given PackageClauseMethods: PackageClauseMethods /** Extension methods of `PackageClause` */ trait PackageClauseMethods: @@ -283,10 +274,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type Import <: Statement /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is an `Import` */ - given ImportTypeTest: TypeTest[Tree, Import] = ImportTypeTestImpl - - /** Implementation of `ImportTypeTest` */ - protected val ImportTypeTestImpl: TypeTest[Tree, Import] + given ImportTypeTest: TypeTest[Tree, Import] /** Module object of `type Import` */ val Import: ImportModule @@ -299,10 +287,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `Import` available without any imports */ - given ImportMethods: ImportMethods = ImportMethodsImpl - - /** Implementation of extension methods on `Import` */ - protected val ImportMethodsImpl: ImportMethods + given ImportMethods: ImportMethods /** Extension methods of `Import` */ trait ImportMethods: @@ -317,18 +302,21 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => */ type Export <: Statement - given TypeTest[Tree, Export] = ExportTypeTest - protected val ExportTypeTest: TypeTest[Tree, Export] + /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is an `Export` */ + given ExportTypeTest: TypeTest[Tree, Export] + /** Module object of `type Export` */ val Export: ExportModule + /** Methods of the module object `val Export` */ trait ExportModule { this: Export.type => def unapply(tree: Export): Option[(Term, List[Selector])] } - given ExportMethods: ExportMethods = ExportMethodsImpl - protected val ExportMethodsImpl: ExportMethods + /** Makes extension methods on `Export` available without any imports */ + given ExportMethods: ExportMethods + /** Extension methods of `Export` */ trait ExportMethods: extension (self: Export): def expr: Term @@ -340,10 +328,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type Statement <: Tree /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `Statement` */ - given StatementTypeTest: TypeTest[Tree, Statement] = StatementTypeTestImpl - - /** Implementation of `StatementTypeTest` */ - protected val StatementTypeTestImpl: TypeTest[Tree, Statement] + given StatementTypeTest: TypeTest[Tree, Statement] // ----- Definitions ---------------------------------------------- @@ -351,10 +336,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type Definition <: Statement /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `Definition` */ - given DefinitionTypeTest: TypeTest[Tree, Definition] = DefinitionTypeTestImpl - - /** Implementation of `DefinitionTypeTest` */ - protected val DefinitionTypeTestImpl: TypeTest[Tree, Definition] + given DefinitionTypeTest: TypeTest[Tree, Definition] /** Module object of `type Definition` */ val Definition: DefinitionModule @@ -363,10 +345,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => trait DefinitionModule { this: Definition.type => } /** Makes extension methods on `Definition` available without any imports */ - given DefinitionMethods: DefinitionMethods = DefinitionMethodsImpl - - /** Implementation of extension methods on `Definition` */ - protected val DefinitionMethodsImpl: DefinitionMethods + given DefinitionMethods: DefinitionMethods /** Extension methods of `Definition` */ trait DefinitionMethods: @@ -381,10 +360,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type ClassDef <: Definition /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `ClassDef` */ - given ClassDefTypeTest: TypeTest[Tree, ClassDef] = ClassDefTypeTestImpl - - /** Implementation of `ClassDefTypeTest` */ - protected val ClassDefTypeTestImpl: TypeTest[Tree, ClassDef] + given ClassDefTypeTest: TypeTest[Tree, ClassDef] /** Module object of `type ClassDef` */ val ClassDef: ClassDefModule @@ -397,10 +373,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `ClassDef` available without any imports */ - given ClassDefMethods: ClassDefMethods = ClassDefMethodsImpl - - /** Implementation of extension methods on `ClassDef` */ - protected val ClassDefMethodsImpl: ClassDefMethods + given ClassDefMethods: ClassDefMethods /** Extension methods of `ClassDef` */ trait ClassDefMethods: @@ -419,10 +392,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type DefDef <: Definition /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `DefDef` */ - given DefDefTypeTest: TypeTest[Tree, DefDef] = DefDefTypeTestImpl - - /** Implementation of `DefDefTypeTest` */ - protected val DefDefTypeTestImpl: TypeTest[Tree, DefDef] + given DefDefTypeTest: TypeTest[Tree, DefDef] /** Module object of `type DefDef` */ val DefDef: DefDefModule @@ -435,10 +405,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `DefDef` available without any imports */ - given DefDefMethods: DefDefMethods = DefDefMethodsImpl - - /** Implementation of extension methods on `DefDef` */ - protected val DefDefMethodsImpl: DefDefMethods + given DefDefMethods: DefDefMethods /** Extension methods of `DefDef` */ trait DefDefMethods: @@ -456,10 +423,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type ValDef <: Definition /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `ValDef` */ - given ValDefTypeTest: TypeTest[Tree, ValDef] = ValDefTypeTestImpl - - /** Implementation of `ValDefTypeTest` */ - protected val ValDefTypeTestImpl: TypeTest[Tree, ValDef] + given ValDefTypeTest: TypeTest[Tree, ValDef] /** Module object of `type ValDef` */ val ValDef: ValDefModule @@ -482,10 +446,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `ValDef` available without any imports */ - given ValDefMethods: ValDefMethods = ValDefMethodsImpl - - /** Implementation of extension methods on `ValDef` */ - protected val ValDefMethodsImpl: ValDefMethods + given ValDefMethods: ValDefMethods /** Extension methods of `ValDef` */ trait ValDefMethods: @@ -501,10 +462,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type TypeDef <: Definition /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `TypeDef` */ - given TypeDefTypeTest: TypeTest[Tree, TypeDef] = TypeDefTypeTestImpl - - /** Implementation of `TypeDefTypeTest` */ - protected val TypeDefTypeTestImpl: TypeTest[Tree, TypeDef] + given TypeDefTypeTest: TypeTest[Tree, TypeDef] /** Module object of `type TypeDef` */ val TypeDef: TypeDefModule @@ -517,10 +475,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `TypeDef` available without any imports */ - given TypeDefMethods: TypeDefMethods = TypeDefMethodsImpl - - /** Implementation of extension methods on `TypeDef` */ - protected val TypeDefMethodsImpl: TypeDefMethods + given TypeDefMethods: TypeDefMethods /** Extension methods of `TypeDef` */ trait TypeDefMethods: @@ -536,10 +491,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type Term <: Statement /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `Term` */ - given TermTypeTest: TypeTest[Tree, Term] = TermTypeTestImpl - - /** Implementation of `TermTypeTest` */ - protected val TermTypeTestImpl: TypeTest[Tree, Term] + given TermTypeTest: TypeTest[Tree, Term] /** Module object of `type Term` */ val Term: TermModule @@ -564,10 +516,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `Term` available without any imports */ - given TermMethods: TermMethods = TermMethodsImpl - - /** Implementation of extension methods on `Term` */ - protected val TermMethodsImpl: TermMethods + given TermMethods: TermMethods /** Extension methods of `Term` */ trait TermMethods { @@ -622,10 +571,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type Ref <: Term /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `Ref` */ - given RefTypeTest: TypeTest[Tree, Ref] = RefTypeTestImpl - - /** Implementation of `RefTypeTest` */ - protected val RefTypeTestImpl: TypeTest[Tree, Ref] + given RefTypeTest: TypeTest[Tree, Ref] /** Module object of `type Ref` */ val Ref: RefModule @@ -657,10 +603,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type Ident <: Ref /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is an `Ident` */ - given IdentTypeTest: TypeTest[Tree, Ident] = IdentTypeTestImpl - - /** Implementation of `IdentTypeTest` */ - protected val IdentTypeTestImpl: TypeTest[Tree, Ident] + given IdentTypeTest: TypeTest[Tree, Ident] /** Module object of `type Ident` */ val Ident: IdentModule @@ -676,10 +619,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `Ident` available without any imports */ - given IdentMethods: IdentMethods = IdentMethodsImpl - - /** Implementation of extension methods on `Ident` */ - protected val IdentMethodsImpl: IdentMethods + given IdentMethods: IdentMethods /** Extension methods of `Ident` */ trait IdentMethods: @@ -692,10 +632,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type Select <: Ref /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `Select` */ - given SelectTypeTest: TypeTest[Tree, Select] = SelectTypeTestImpl - - /** Implementation of `SelectTypeTest` */ - protected val SelectTypeTestImpl: TypeTest[Tree, Select] + given SelectTypeTest: TypeTest[Tree, Select] /** Module object of `type Select` */ val Select: SelectModule @@ -726,10 +663,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `Select` available without any imports */ - given SelectMethods: SelectMethods = SelectMethodsImpl - - /** Implementation of extension methods on `Select` */ - protected val SelectMethodsImpl: SelectMethods + given SelectMethods: SelectMethods /** Extension methods of `Select` */ trait SelectMethods: @@ -741,10 +675,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => end SelectMethods /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `Literal` */ - given LiteralTypeTest: TypeTest[Tree, Literal] = LiteralTypeTestImpl - - /** Implementation of `LiteralTypeTest` */ - protected val LiteralTypeTestImpl: TypeTest[Tree, Literal] + given LiteralTypeTest: TypeTest[Tree, Literal] /** Tree representing a literal value in the source code */ type Literal <: Term @@ -765,10 +696,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `Literal` available without any imports */ - given LiteralMethods: LiteralMethods = LiteralMethodsImpl - - /** Implementation of extension methods on `Literal` */ - protected val LiteralMethodsImpl: LiteralMethods + given LiteralMethods: LiteralMethods /** Extension methods of `Literal` */ trait LiteralMethods: @@ -781,10 +709,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type This <: Term /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `This` */ - given ThisTypeTest: TypeTest[Tree, This] = ThisTypeTestImpl - - /** Implementation of `ThisTypeTest` */ - protected val ThisTypeTestImpl: TypeTest[Tree, This] + given ThisTypeTest: TypeTest[Tree, This] /** Module object of `type This` */ val This: ThisModule @@ -802,10 +727,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `This` available without any imports */ - given ThisMethods: ThisMethods = ThisMethodsImpl - - /** Implementation of extension methods on `This` */ - protected val ThisMethodsImpl: ThisMethods + given ThisMethods: ThisMethods /** Extension methods of `This` */ trait ThisMethods: @@ -818,10 +740,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type New <: Term /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `New` */ - given NewTypeTest: TypeTest[Tree, New] = NewTypeTestImpl - - /** Implementation of `NewTypeTest` */ - protected val NewTypeTestImpl: TypeTest[Tree, New] + given NewTypeTest: TypeTest[Tree, New] /** Module object of `type New` */ val New: NewModule @@ -839,10 +758,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `New` available without any imports */ - given NewMethods: NewMethods = NewMethodsImpl - - /** Implementation of extension methods on `New` */ - protected val NewMethodsImpl: NewMethods + given NewMethods: NewMethods /** Extension methods of `New` */ trait NewMethods: @@ -855,10 +771,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type NamedArg <: Term /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `NamedArg` */ - given NamedArgTypeTest: TypeTest[Tree, NamedArg] = NamedArgTypeTestImpl - - /** Implementation of `NamedArgTypeTest` */ - protected val NamedArgTypeTestImpl: TypeTest[Tree, NamedArg] + given NamedArgTypeTest: TypeTest[Tree, NamedArg] /** Module object of `type NamedArg` */ val NamedArg: NamedArgModule @@ -876,10 +789,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `NamedArg` available without any imports */ - given NamedArgMethods: NamedArgMethods = NamedArgMethodsImpl - - /** Implementation of extension methods on `NamedArg` */ - protected val NamedArgMethodsImpl: NamedArgMethods + given NamedArgMethods: NamedArgMethods /** Extension methods of `NamedArg` */ trait NamedArgMethods: @@ -893,10 +803,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type Apply <: Term /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is an `Apply` */ - given ApplyTypeTest: TypeTest[Tree, Apply] = ApplyTypeTestImpl - - /** Implementation of `ApplyTypeTest` */ - protected val ApplyTypeTestImpl: TypeTest[Tree, Apply] + given ApplyTypeTest: TypeTest[Tree, Apply] /** Module object of `type Apply` */ val Apply: ApplyModule @@ -914,10 +821,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `Apply` available without any imports */ - given ApplyMethods: ApplyMethods = ApplyMethodsImpl - - /** Implementation of extension methods on `Apply` */ - protected val ApplyMethodsImpl: ApplyMethods + given ApplyMethods: ApplyMethods /** Extension methods of `Apply` */ trait ApplyMethods: @@ -931,10 +835,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type TypeApply <: Term /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `TypeApply` */ - given TypeApplyTypeTest: TypeTest[Tree, TypeApply] = TypeApplyTypeTestImpl - - /** Implementation of `TypeApplyTypeTest` */ - protected val TypeApplyTypeTestImpl: TypeTest[Tree, TypeApply] + given TypeApplyTypeTest: TypeTest[Tree, TypeApply] /** Module object of `type TypeApply` */ val TypeApply: TypeApplyModule @@ -952,10 +853,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `TypeApply` available without any imports */ - given TypeApplyMethods: TypeApplyMethods = TypeApplyMethodsImpl - - /** Implementation of extension methods on `TypeApply` */ - protected val TypeApplyMethodsImpl: TypeApplyMethods + given TypeApplyMethods: TypeApplyMethods /** Extension methods of `TypeApply` */ trait TypeApplyMethods: @@ -966,10 +864,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => end TypeApplyMethods /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `Super` */ - given SuperTypeTest: TypeTest[Tree, Super] = SuperTypeTestImpl - - /** Implementation of `SuperTypeTest` */ - protected val SuperTypeTestImpl: TypeTest[Tree, Super] + given SuperTypeTest: TypeTest[Tree, Super] /** Tree representing `super` in the source code */ type Super <: Term @@ -990,10 +885,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `Super` available without any imports */ - given SuperMethods: SuperMethods = SuperMethodsImpl - - /** Implementation of extension methods on `Super` */ - protected val SuperMethodsImpl: SuperMethods + given SuperMethods: SuperMethods /** Extension methods of `Super` */ trait SuperMethods: @@ -1005,10 +897,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => end SuperMethods /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `Typed` */ - given TypedTypeTest: TypeTest[Tree, Typed] = TypedTypeTestImpl - - /** Implementation of `TypedTypeTest` */ - protected val TypedTypeTestImpl: TypeTest[Tree, Typed] + given TypedTypeTest: TypeTest[Tree, Typed] /** Tree representing a type ascription `x: T` in the source code */ type Typed <: Term @@ -1029,10 +918,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `Typed` available without any imports */ - given TypedMethods: TypedMethods = TypedMethodsImpl - - /** Implementation of extension methods on `Typed` */ - protected val TypedMethodsImpl: TypedMethods + given TypedMethods: TypedMethods /** Extension methods of `Typed` */ trait TypedMethods: @@ -1046,10 +932,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type Assign <: Term /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is an `Assign` */ - given AssignTypeTest: TypeTest[Tree, Assign] = AssignTypeTestImpl - - /** Implementation of `AssignTypeTest` */ - protected val AssignTypeTestImpl: TypeTest[Tree, Assign] + given AssignTypeTest: TypeTest[Tree, Assign] /** Module object of `type Assign` */ val Assign: AssignModule @@ -1067,10 +950,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `Assign` available without any imports */ - given AssignMethods: AssignMethods = AssignMethodsImpl - - /** Implementation of extension methods on `Assign` */ - protected val AssignMethodsImpl: AssignMethods + given AssignMethods: AssignMethods /** Extension methods of `Assign` */ trait AssignMethods: @@ -1084,10 +964,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type Block <: Term /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `Block` */ - given BlockTypeTest: TypeTest[Tree, Block] = BlockTypeTestImpl - - /** Implementation of `BlockTypeTest` */ - protected val BlockTypeTestImpl: TypeTest[Tree, Block] + given BlockTypeTest: TypeTest[Tree, Block] /** Module object of `type Block` */ val Block: BlockModule @@ -1105,10 +982,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `Block` available without any imports */ - given BlockMethods: BlockMethods = BlockMethodsImpl - - /** Implementation of extension methods on `Block` */ - protected val BlockMethodsImpl: BlockMethods + given BlockMethods: BlockMethods /** Extension methods of `Block` */ trait BlockMethods: @@ -1119,10 +993,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => end BlockMethods /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `Closure` */ - given ClosureTypeTest: TypeTest[Tree, Closure] = ClosureTypeTestImpl - - /** Implementation of `ClosureTypeTest` */ - protected val ClosureTypeTestImpl: TypeTest[Tree, Closure] + given ClosureTypeTest: TypeTest[Tree, Closure] /** A lambda `(...) => ...` in the source code is represented as * a local method and a closure: @@ -1149,10 +1020,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `Closure` available without any imports */ - given ClosureMethods: ClosureMethods = ClosureMethodsImpl - - /** Implementation of extension methods on `Closure` */ - protected val ClosureMethodsImpl: ClosureMethods + given ClosureMethods: ClosureMethods /** Extension methods of `Closure` */ trait ClosureMethods: @@ -1199,10 +1067,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is an `If` */ - given IfTypeTest: TypeTest[Tree, If] = IfTypeTestImpl - - /** Implementation of `IfTypeTest` */ - protected val IfTypeTestImpl: TypeTest[Tree, If] + given IfTypeTest: TypeTest[Tree, If] /** Tree representing an if/then/else `if (...) ... else ...` in the source code */ type If <: Term @@ -1223,10 +1088,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `If` available without any imports */ - given IfMethods: IfMethods = IfMethodsImpl - - /** Implementation of extension methods on `If` */ - protected val IfMethodsImpl: IfMethods + given IfMethods: IfMethods /** Extension methods of `If` */ trait IfMethods: @@ -1242,10 +1104,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type Match <: Term /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `Match` */ - given MatchTypeTest: TypeTest[Tree, Match] = MatchTypeTestImpl - - /** Implementation of `MatchTypeTest` */ - protected val MatchTypeTestImpl: TypeTest[Tree, Match] + given MatchTypeTest: TypeTest[Tree, Match] /** Module object of `type Match` */ val Match: MatchModule @@ -1263,10 +1122,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `Match` available without any imports */ - given MatchMethods: MatchMethods = MatchMethodsImpl - - /** Implementation of extension methods on `Match` */ - protected val MatchMethodsImpl: MatchMethods + given MatchMethods: MatchMethods /** Extension methods of `Match` */ trait MatchMethods: @@ -1281,10 +1137,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type SummonFrom <: Term /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `SummonFrom` */ - given SummonFromTypeTest: TypeTest[Tree, SummonFrom] = SummonFromTypeTestImpl - - /** Implementation of `SummonFromTypeTest` */ - protected val SummonFromTypeTestImpl: TypeTest[Tree, SummonFrom] + given SummonFromTypeTest: TypeTest[Tree, SummonFrom] /** Module object of `type SummonFrom` */ val SummonFrom: SummonFromModule @@ -1302,10 +1155,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `SummonFrom` available without any imports */ - given SummonFromMethods: SummonFromMethods = SummonFromMethodsImpl - - /** Implementation of extension methods on `SummonFrom` */ - protected val SummonFromMethodsImpl: SummonFromMethods + given SummonFromMethods: SummonFromMethods /** Extension methods of `SummonFrom` */ trait SummonFromMethods: @@ -1318,10 +1168,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type Try <: Term /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `Try` */ - given TryTypeTest: TypeTest[Tree, Try] = TryTypeTestImpl - - /** Implementation of `TryTypeTest` */ - protected val TryTypeTestImpl: TypeTest[Tree, Try] + given TryTypeTest: TypeTest[Tree, Try] /** Module object of `type Try` */ val Try: TryModule @@ -1339,10 +1186,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `Try` available without any imports */ - given TryMethods: TryMethods = TryMethodsImpl - - /** Implementation of extension methods on `Try` */ - protected val TryMethodsImpl: TryMethods + given TryMethods: TryMethods /** Extension methods of `Try` */ trait TryMethods: @@ -1354,10 +1198,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => end TryMethods /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `Return` */ - given ReturnTypeTest: TypeTest[Tree, Return] = ReturnTypeTestImpl - - /** Implementation of `ReturnTypeTest` */ - protected val ReturnTypeTestImpl: TypeTest[Tree, Return] + given ReturnTypeTest: TypeTest[Tree, Return] /** Tree representing a `return` in the source code */ type Return <: Term @@ -1378,10 +1219,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `Return` available without any imports */ - given ReturnMethods: ReturnMethods = ReturnMethodsImpl - - /** Implementation of extension methods on `Return` */ - protected val ReturnMethodsImpl: ReturnMethods + given ReturnMethods: ReturnMethods /** Extension methods of `Return` */ trait ReturnMethods: @@ -1395,10 +1233,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type Repeated <: Term /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `Repeated` */ - given RepeatedTypeTest: TypeTest[Tree, Repeated] = RepeatedTypeTestImpl - - /** Implementation of `RepeatedTypeTest` */ - protected val RepeatedTypeTestImpl: TypeTest[Tree, Repeated] + given RepeatedTypeTest: TypeTest[Tree, Repeated] /** Module object of `type Repeated` */ val Repeated: RepeatedModule @@ -1411,10 +1246,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `Repeated` available without any imports */ - given RepeatedMethods: RepeatedMethods = RepeatedMethodsImpl - - /** Implementation of extension methods on `Repeated` */ - protected val RepeatedMethodsImpl: RepeatedMethods + given RepeatedMethods: RepeatedMethods /** Extension methods of `Repeated` */ trait RepeatedMethods: @@ -1428,10 +1260,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type Inlined <: Term /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is an `Inlined` */ - given InlinedTypeTest: TypeTest[Tree, Inlined] = InlinedTypeTestImpl - - /** Implementation of `InlinedTypeTest` */ - protected val InlinedTypeTestImpl: TypeTest[Tree, Inlined] + given InlinedTypeTest: TypeTest[Tree, Inlined] /** Module object of `type Inlined` */ val Inlined: InlinedModule @@ -1444,10 +1273,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `Inlined` available without any imports */ - given InlinedMethods: InlinedMethods = InlinedMethodsImpl - - /** Implementation of extension methods on `Inlined` */ - protected val InlinedMethodsImpl: InlinedMethods + given InlinedMethods: InlinedMethods /** Extension methods of `Inlined` */ trait InlinedMethods: @@ -1462,10 +1288,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type SelectOuter <: Term /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `SelectOuter` */ - given SelectOuterTypeTest: TypeTest[Tree, SelectOuter] = SelectOuterTypeTestImpl - - /** Implementation of `SelectOuterTypeTest` */ - protected val SelectOuterTypeTestImpl: TypeTest[Tree, SelectOuter] + given SelectOuterTypeTest: TypeTest[Tree, SelectOuter] /** Module object of `type SelectOuter` */ val SelectOuter: SelectOuterModule @@ -1478,10 +1301,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `SelectOuter` available without any imports */ - given SelectOuterMethods: SelectOuterMethods = SelectOuterMethodsImpl - - /** Implementation of extension methods on `SelectOuter` */ - protected val SelectOuterMethodsImpl: SelectOuterMethods + given SelectOuterMethods: SelectOuterMethods /** Extension methods of `SelectOuter` */ trait SelectOuterMethods: @@ -1496,10 +1316,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type While <: Term /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `While` */ - given WhileTypeTest: TypeTest[Tree, While] = WhileTypeTestImpl - - /** Implementation of `WhileTypeTest` */ - protected val WhileTypeTestImpl: TypeTest[Tree, While] + given WhileTypeTest: TypeTest[Tree, While] /** Module object of `type While` */ val While: WhileModule @@ -1517,10 +1334,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `While` available without any imports */ - given WhileMethods: WhileMethods = WhileMethodsImpl - - /** Implementation of extension methods on `While` */ - protected val WhileMethodsImpl: WhileMethods + given WhileMethods: WhileMethods /** Extension methods of `While` */ trait WhileMethods: @@ -1536,10 +1350,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type TypeTree <: Tree /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `TypeTree` */ - given TypeTreeTypeTest: TypeTest[Tree, TypeTree] = TypeTreeTypeTestImpl - - /** Implementation of `TypeTreeTypeTest` */ - protected val TypeTreeTypeTestImpl: TypeTest[Tree, TypeTree] + given TypeTreeTypeTest: TypeTest[Tree, TypeTree] /** Module object of `type TypeTree` */ val TypeTree: TypeTreeModule @@ -1551,10 +1362,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `TypeTree` available without any imports */ - given TypeTreeMethods: TypeTreeMethods = TypeTreeMethodsImpl - - /** Implementation of extension methods on `TypeTree` */ - protected val TypeTreeMethodsImpl: TypeTreeMethods + given TypeTreeMethods: TypeTreeMethods /** Extension methods of `TypeTree` */ trait TypeTreeMethods: @@ -1568,10 +1376,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type Inferred <: TypeTree /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is an `Inferred` */ - given InferredTypeTest: TypeTest[Tree, Inferred] = InferredTypeTestImpl - - /** Implementation of `InferredTypeTest` */ - protected val InferredTypeTestImpl: TypeTest[Tree, Inferred] + given InferredTypeTest: TypeTest[Tree, Inferred] /** Module object of `type Inferred` */ val Inferred: InferredModule @@ -1587,10 +1392,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type TypeIdent <: TypeTree /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `TypeIdent` */ - given TypeIdentTypeTest: TypeTest[Tree, TypeIdent] = TypeIdentTypeTestImpl - - /** Implementation of `TypeIdentTypeTest` */ - protected val TypeIdentTypeTestImpl: TypeTest[Tree, TypeIdent] + given TypeIdentTypeTest: TypeTest[Tree, TypeIdent] /** Module object of `type TypeIdent` */ val TypeIdent: TypeIdentModule @@ -1603,10 +1405,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `TypeIdent` available without any imports */ - given TypeIdentMethods: TypeIdentMethods = TypeIdentMethodsImpl - - /** Implementation of extension methods on `TypeIdent` */ - protected val TypeIdentMethodsImpl: TypeIdentMethods + given TypeIdentMethods: TypeIdentMethods /** Extension methods of `TypeIdent` */ trait TypeIdentMethods: @@ -1619,10 +1418,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type TypeSelect <: TypeTree /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `TypeSelect` */ - given TypeSelectTypeTest: TypeTest[Tree, TypeSelect] = TypeSelectTypeTestImpl - - /** Implementation of `TypeSelectTypeTest` */ - protected val TypeSelectTypeTestImpl: TypeTest[Tree, TypeSelect] + given TypeSelectTypeTest: TypeTest[Tree, TypeSelect] /** Module object of `type TypeSelect` */ val TypeSelect: TypeSelectModule @@ -1635,10 +1431,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `TypeSelect` available without any imports */ - given TypeSelectMethods: TypeSelectMethods = TypeSelectMethodsImpl - - /** Implementation of extension methods on `TypeSelect` */ - protected val TypeSelectMethodsImpl: TypeSelectMethods + given TypeSelectMethods: TypeSelectMethods /** Extension methods of `TypeSelect` */ trait TypeSelectMethods: @@ -1652,10 +1445,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type TypeProjection <: TypeTree /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `TypeProjection` */ - given TypeProjectionTypeTest: TypeTest[Tree, TypeProjection] = TypeProjectionTypeTestImpl - - /** Implementation of `TypeProjectionTypeTest` */ - protected val TypeProjectionTypeTestImpl: TypeTest[Tree, TypeProjection] + given TypeProjectionTypeTest: TypeTest[Tree, TypeProjection] /** Module object of `type TypeProjection` */ val TypeProjection: TypeProjectionModule @@ -1668,10 +1458,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `TypeProjection` available without any imports */ - given TypeProjectionMethods: TypeProjectionMethods = TypeProjectionMethodsImpl - - /** Implementation of extension methods on `TypeProjection` */ - protected val TypeProjectionMethodsImpl: TypeProjectionMethods + given TypeProjectionMethods: TypeProjectionMethods /** Extension methods of `TypeProjection` */ trait TypeProjectionMethods: @@ -1685,10 +1472,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type Singleton <: TypeTree /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `Singleton` */ - given SingletonTypeTest: TypeTest[Tree, Singleton] = SingletonTypeTestImpl - - /** Implementation of `SingletonTypeTest` */ - protected val SingletonTypeTestImpl: TypeTest[Tree, Singleton] + given SingletonTypeTest: TypeTest[Tree, Singleton] /** Module object of `type Singleton` */ val Singleton: SingletonModule @@ -1701,10 +1485,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `Singleton` available without any imports */ - given SingletonMethods: SingletonMethods = SingletonMethodsImpl - - /** Implementation of extension methods on `Singleton` */ - protected val SingletonMethodsImpl: SingletonMethods + given SingletonMethods: SingletonMethods /** Extension methods of `Singleton` */ trait SingletonMethods: @@ -1717,10 +1498,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type Refined <: TypeTree /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `Refined` */ - given RefinedTypeTest: TypeTest[Tree, Refined] = RefinedTypeTestImpl - - /** Implementation of `RefinedTypeTest` */ - protected val RefinedTypeTestImpl: TypeTest[Tree, Refined] + given RefinedTypeTest: TypeTest[Tree, Refined] /** Module object of `type Refined` */ val Refined: RefinedModule @@ -1733,10 +1511,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `Refined` available without any imports */ - given RefinedMethods: RefinedMethods = RefinedMethodsImpl - - /** Implementation of extension methods on `Refined` */ - protected val RefinedMethodsImpl: RefinedMethods + given RefinedMethods: RefinedMethods /** Extension methods of `Refined` */ trait RefinedMethods: @@ -1750,10 +1525,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type Applied <: TypeTree /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is an `Applied` */ - given AppliedTypeTest: TypeTest[Tree, Applied] = AppliedTypeTestImpl - - /** Implementation of `AppliedTypeTest` */ - protected val AppliedTypeTestImpl: TypeTest[Tree, Applied] + given AppliedTypeTest: TypeTest[Tree, Applied] /** Module object of `type Applied` */ val Applied: AppliedModule @@ -1766,10 +1538,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `Applied` available without any imports */ - given AppliedMethods: AppliedMethods = AppliedMethodsImpl - - /** Implementation of extension methods on `Applied` */ - protected val AppliedMethodsImpl: AppliedMethods + given AppliedMethods: AppliedMethods /** Extension methods of `Applied` */ trait AppliedMethods: @@ -1783,10 +1552,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type Annotated <: TypeTree /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is an `Annotated` */ - given AnnotatedTypeTest: TypeTest[Tree, Annotated] = AnnotatedTypeTestImpl - - /** Implementation of `AnnotatedTypeTest` */ - protected val AnnotatedTypeTestImpl: TypeTest[Tree, Annotated] + given AnnotatedTypeTest: TypeTest[Tree, Annotated] /** Module object of `type Annotated` */ val Annotated: AnnotatedModule @@ -1799,10 +1565,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `Annotated` available without any imports */ - given AnnotatedMethods: AnnotatedMethods = AnnotatedMethodsImpl - - /** Implementation of extension methods on `Annotated` */ - protected val AnnotatedMethodsImpl: AnnotatedMethods + given AnnotatedMethods: AnnotatedMethods /** Extension methods of `Annotated` */ trait AnnotatedMethods: @@ -1816,10 +1579,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type MatchTypeTree <: TypeTree /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `MatchTypeTree` */ - given MatchTypeTreeTypeTest: TypeTest[Tree, MatchTypeTree] = MatchTypeTreeTypeTestImpl - - /** Implementation of `MatchTypeTreeTypeTest` */ - protected val MatchTypeTreeTypeTestImpl: TypeTest[Tree, MatchTypeTree] + given MatchTypeTreeTypeTest: TypeTest[Tree, MatchTypeTree] /** Module object of `type MatchTypeTree` */ val MatchTypeTree: MatchTypeTreeModule @@ -1832,10 +1592,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `MatchTypeTree` available without any imports */ - given MatchTypeTreeMethods: MatchTypeTreeMethods = MatchTypeTreeMethodsImpl - - /** Implementation of extension methods on `MatchTypeTree` */ - protected val MatchTypeTreeMethodsImpl: MatchTypeTreeMethods + given MatchTypeTreeMethods: MatchTypeTreeMethods /** Extension methods of `MatchTypeTree` */ trait MatchTypeTreeMethods: @@ -1850,10 +1607,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type ByName <: TypeTree /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `ByName` */ - given ByNameTypeTest: TypeTest[Tree, ByName] = ByNameTypeTestImpl - - /** Implementation of `ByNameTypeTest` */ - protected val ByNameTypeTestImpl: TypeTest[Tree, ByName] + given ByNameTypeTest: TypeTest[Tree, ByName] /** Module object of `type ByName` */ val ByName: ByNameModule @@ -1866,10 +1620,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `ByName` available without any imports */ - given ByNameMethods: ByNameMethods = ByNameMethodsImpl - - /** Implementation of extension methods on `ByName` */ - protected val ByNameMethodsImpl: ByNameMethods + given ByNameMethods: ByNameMethods /** Extension methods of `ByName` */ trait ByNameMethods: @@ -1882,10 +1633,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type LambdaTypeTree <: TypeTree /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `LambdaTypeTree` */ - given LambdaTypeTreeTypeTest: TypeTest[Tree, LambdaTypeTree] = LambdaTypeTreeTypeTestImpl - - /** Implementation of `LambdaTypeTreeTypeTest` */ - protected val LambdaTypeTreeTypeTestImpl: TypeTest[Tree, LambdaTypeTree] + given LambdaTypeTreeTypeTest: TypeTest[Tree, LambdaTypeTree] /** Module object of `type LambdaTypeTree` */ val LambdaTypeTree: LambdaTypeTreeModule @@ -1898,10 +1646,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `LambdaTypeTree` available without any imports */ - given LambdaTypeTreeMethods: LambdaTypeTreeMethods = LambdaTypeTreeMethodsImpl - - /** Implementation of extension methods on `LambdaTypeTree` */ - protected val LambdaTypeTreeMethodsImpl: LambdaTypeTreeMethods + given LambdaTypeTreeMethods: LambdaTypeTreeMethods /** Extension methods of `LambdaTypeTree` */ trait LambdaTypeTreeMethods: @@ -1915,10 +1660,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type TypeBind <: TypeTree /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `TypeBind` */ - given TypeBindTypeTest: TypeTest[Tree, TypeBind] = TypeBindTypeTestImpl - - /** Implementation of `TypeBindTypeTest` */ - protected val TypeBindTypeTestImpl: TypeTest[Tree, TypeBind] + given TypeBindTypeTest: TypeTest[Tree, TypeBind] /** Module object of `type TypeBind` */ val TypeBind: TypeBindModule @@ -1931,10 +1673,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `TypeBind` available without any imports */ - given TypeBindMethods: TypeBindMethods = TypeBindMethodsImpl - - /** Implementation of extension methods on `TypeBind` */ - protected val TypeBindMethodsImpl: TypeBindMethods + given TypeBindMethods: TypeBindMethods /** Extension methods of `TypeBind` */ trait TypeBindMethods: @@ -1948,10 +1687,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type TypeBlock <: TypeTree /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `TypeBlock` */ - given TypeBlockTypeTest: TypeTest[Tree, TypeBlock] = TypeBlockTypeTestImpl - - /** Implementation of `TypeBlockTypeTest` */ - protected val TypeBlockTypeTestImpl: TypeTest[Tree, TypeBlock] + given TypeBlockTypeTest: TypeTest[Tree, TypeBlock] /** Module object of `type TypeBlock` */ val TypeBlock: TypeBlockModule @@ -1964,10 +1700,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `TypeBlock` available without any imports */ - given TypeBlockMethods: TypeBlockMethods = TypeBlockMethodsImpl - - /** Implementation of extension methods on `TypeBlock` */ - protected val TypeBlockMethodsImpl: TypeBlockMethods + given TypeBlockMethods: TypeBlockMethods /** Extension methods of `TypeBlock` */ trait TypeBlockMethods: @@ -1983,10 +1716,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type TypeBoundsTree <: Tree /*TypeTree | TypeBoundsTree*/ /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `TypeBoundsTree` */ - given TypeBoundsTreeTypeTest: TypeTest[Tree, TypeBoundsTree] = TypeBoundsTreeTypeTestImpl - - /** Implementation of `TypeBoundsTreeTypeTest` */ - protected val TypeBoundsTreeTypeTestImpl: TypeTest[Tree, TypeBoundsTree] + given TypeBoundsTreeTypeTest: TypeTest[Tree, TypeBoundsTree] /** Module object of `type TypeBoundsTree` */ val TypeBoundsTree: TypeBoundsTreeModule @@ -1999,10 +1729,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `TypeBoundsTree` available without any imports */ - given TypeBoundsTreeMethods: TypeBoundsTreeMethods = TypeBoundsTreeMethodsImpl - - /** Implementation of extension methods on `TypeBoundsTree` */ - protected val TypeBoundsTreeMethodsImpl: TypeBoundsTreeMethods + given TypeBoundsTreeMethods: TypeBoundsTreeMethods /** Extension methods of `TypeBoundsTree` */ trait TypeBoundsTreeMethods: @@ -2020,10 +1747,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type WildcardTypeTree <: Tree /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `WildcardTypeTree` */ - given WildcardTypeTreeTypeTest: TypeTest[Tree, WildcardTypeTree] = WildcardTypeTreeTypeTestImpl - - /** Implementation of `WildcardTypeTreeTypeTest` */ - protected val WildcardTypeTreeTypeTestImpl: TypeTest[Tree, WildcardTypeTree] + given WildcardTypeTreeTypeTest: TypeTest[Tree, WildcardTypeTree] /** Module object of `type WildcardTypeTree` */ val WildcardTypeTree: WildcardTypeTreeModule @@ -2036,10 +1760,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `WildcardTypeTree` available without any imports */ - given WildcardTypeTreeMethods: WildcardTypeTreeMethods = WildcardTypeTreeMethodsImpl - - /** Implementation of extension methods on `WildcardTypeTree` */ - protected val WildcardTypeTreeMethodsImpl: WildcardTypeTreeMethods + given WildcardTypeTreeMethods: WildcardTypeTreeMethods /** Extension methods of `WildcardTypeTree` */ trait WildcardTypeTreeMethods: @@ -2054,10 +1775,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type CaseDef <: Tree /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `CaseDef` */ - given CaseDefTypeTest: TypeTest[Tree, CaseDef] = CaseDefTypeTestImpl - - /** Implementation of `CaseDefTypeTest` */ - protected val CaseDefTypeTestImpl: TypeTest[Tree, CaseDef] + given CaseDefTypeTest: TypeTest[Tree, CaseDef] /** Module object of `type CaseDef` */ val CaseDef: CaseDefModule @@ -2070,10 +1788,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `CaseDef` available without any imports */ - given CaseDefMethods: CaseDefMethods = CaseDefMethodsImpl - - /** Implementation of extension methods on `CaseDef` */ - protected val CaseDefMethodsImpl: CaseDefMethods + given CaseDefMethods: CaseDefMethods /** Extension methods of `CaseDef` */ trait CaseDefMethods: @@ -2088,10 +1803,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type TypeCaseDef <: Tree /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `TypeCaseDef` */ - given TypeCaseDefTypeTest: TypeTest[Tree, TypeCaseDef] = TypeCaseDefTypeTestImpl - - /** Implementation of `TypeCaseDefTypeTest` */ - protected val TypeCaseDefTypeTestImpl: TypeTest[Tree, TypeCaseDef] + given TypeCaseDefTypeTest: TypeTest[Tree, TypeCaseDef] /** Module object of `type TypeCaseDef` */ val TypeCaseDef: TypeCaseDefModule @@ -2104,10 +1816,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `TypeCaseDef` available without any imports */ - given TypeCaseDefMethods: TypeCaseDefMethods = TypeCaseDefMethodsImpl - - /** Implementation of extension methods on `TypeCaseDef` */ - protected val TypeCaseDefMethodsImpl: TypeCaseDefMethods + given TypeCaseDefMethods: TypeCaseDefMethods /** Extension methods of `TypeCaseDef` */ trait TypeCaseDefMethods: @@ -2123,10 +1832,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type Bind <: Tree /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is a `Bind` */ - given BindTypeTest: TypeTest[Tree, Bind] = BindTypeTestImpl - - /** Implementation of `BindTypeTest` */ - protected val BindTypeTestImpl: TypeTest[Tree, Bind] + given BindTypeTest: TypeTest[Tree, Bind] /** Module object of `type Bind` */ val Bind: BindModule @@ -2139,10 +1845,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `Bind` available without any imports */ - given BindMethods: BindMethods = BindMethodsImpl - - /** Implementation of extension methods on `Bind` */ - protected val BindMethodsImpl: BindMethods + given BindMethods: BindMethods /** Extension methods of `Bind` */ trait BindMethods: @@ -2156,10 +1859,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type Unapply <: Tree /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is an `Unapply` */ - given UnapplyTypeTest: TypeTest[Tree, Unapply] = UnapplyTypeTestImpl - - /** Implementation of `UnapplyTypeTest` */ - protected val UnapplyTypeTestImpl: TypeTest[Tree, Unapply] + given UnapplyTypeTest: TypeTest[Tree, Unapply] /** Module object of `type Unapply` */ val Unapply: UnapplyModule @@ -2172,10 +1872,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `Unapply` available without any imports */ - given UnapplyMethods: UnapplyMethods = UnapplyMethodsImpl - - /** Implementation of extension methods on `Unapply` */ - protected val UnapplyMethodsImpl: UnapplyMethods + given UnapplyMethods: UnapplyMethods /** Extension methods of `Unapply` */ trait UnapplyMethods: @@ -2190,10 +1887,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type Alternatives <: Tree /** `TypeTest` that allows testing at runtime in a pattern match if a `Tree` is an `Alternatives` */ - given AlternativesTypeTest: TypeTest[Tree, Alternatives] = AlternativesTypeTestImpl - - /** Implementation of `AlternativesTypeTest` */ - protected val AlternativesTypeTestImpl: TypeTest[Tree, Alternatives] + given AlternativesTypeTest: TypeTest[Tree, Alternatives] /** Module object of `type Alternatives` */ val Alternatives: AlternativesModule @@ -2206,10 +1900,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `Alternatives` available without any imports */ - given AlternativesMethods: AlternativesMethods = AlternativesMethodsImpl - - /** Implementation of extension methods on `Alternatives` */ - protected val AlternativesMethodsImpl: AlternativesMethods + given AlternativesMethods: AlternativesMethods /** Extension methods of `Alternatives` */ trait AlternativesMethods: @@ -2240,10 +1931,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type SimpleSelector <: Selector /** `TypeTest` that allows testing at runtime in a pattern match if a `Selector` is a `SimpleSelector` */ - given SimpleSelectorTypeTest: TypeTest[Selector, SimpleSelector] = SimpleSelectorTypeTestImpl - - /** Implementation of `TypeTest[Selector, SimpleSelector]` */ - protected val SimpleSelectorTypeTestImpl: TypeTest[Selector, SimpleSelector] + given SimpleSelectorTypeTest: TypeTest[Selector, SimpleSelector] /** Module object of `type SimpleSelector` */ val SimpleSelector: SimpleSelectorModule @@ -2254,10 +1942,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `SimpleSelector` available without any imports */ - given SimpleSelectorMethods: SimpleSelectorMethods = SimpleSelectorMethodsImpl - - /** Implementation of extension methods on `SimpleSelector` */ - protected val SimpleSelectorMethodsImpl: SimpleSelectorMethods + given SimpleSelectorMethods: SimpleSelectorMethods /** Extension methods of `SimpleSelector` */ trait SimpleSelectorMethods: @@ -2271,10 +1956,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type RenameSelector <: Selector /** `TypeTest` that allows testing at runtime in a pattern match if a `Selector` is a `RenameSelector` */ - given RenameSelectorTypeTest: TypeTest[Selector, RenameSelector] = RenameSelectorTypeTestImpl - - /** Implementation of `TypeTest[Selector, RenameSelector]` */ - protected val RenameSelectorTypeTestImpl: TypeTest[Selector, RenameSelector] + given RenameSelectorTypeTest: TypeTest[Selector, RenameSelector] /** Module object of `type RenameSelector` */ val RenameSelector: RenameSelectorModule @@ -2285,10 +1967,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `RenameSelector` available without any imports */ - given RenameSelectorMethods: RenameSelectorMethods = RenameSelectorMethodsImpl - - /** Implementation of extension methods on `RenameSelector` */ - protected val RenameSelectorMethodsImpl: RenameSelectorMethods + given RenameSelectorMethods: RenameSelectorMethods /** Extension methods of `RenameSelector` */ trait RenameSelectorMethods: @@ -2304,10 +1983,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type OmitSelector <: Selector /** `TypeTest` that allows testing at runtime in a pattern match if a `Selector` is an `OmitSelector` */ - given OmitSelectorTypeTest: TypeTest[Selector, OmitSelector] = OmitSelectorTypeTestImpl - - /** Implementation of `TypeTest[Selector, OmitSelector]` */ - protected val OmitSelectorTypeTestImpl: TypeTest[Selector, OmitSelector] + given OmitSelectorTypeTest: TypeTest[Selector, OmitSelector] /** Module object of `type OmitSelector` */ val OmitSelector: OmitSelectorModule @@ -2318,10 +1994,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `OmitSelector` available without any imports */ - given OmitSelectorMethods: OmitSelectorMethods = OmitSelectorMethodsImpl - - /** Implementation of extension methods on `OmitSelector` */ - protected val OmitSelectorMethodsImpl: OmitSelectorMethods + given OmitSelectorMethods: OmitSelectorMethods /** Extension methods of `OmitSelector` */ trait OmitSelectorMethods: @@ -2334,10 +2007,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type GivenSelector <: Selector /** `TypeTest` that allows testing at runtime in a pattern match if an `Selector` is a `GivenSelector` */ - given GivenSelectorTypeTest: TypeTest[Selector, GivenSelector] = GivenSelectorTypeTestImpl - - /** Implementation of `TypeTest[Selector, GivenSelector]` */ - protected val GivenSelectorTypeTestImpl: TypeTest[Selector, GivenSelector] + given GivenSelectorTypeTest: TypeTest[Selector, GivenSelector] /** Module object of `type GivenSelector` */ val GivenSelector: GivenSelectorModule @@ -2348,10 +2018,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `GivenSelector` available without any imports */ - given GivenSelectorMethods: GivenSelectorMethods = GivenSelectorMethodsImpl - - /** Implementation of extension methods on `GivenSelector` */ - protected val GivenSelectorMethodsImpl: GivenSelectorMethods + given GivenSelectorMethods: GivenSelectorMethods /** Extension methods of `GivenSelector` */ trait GivenSelectorMethods: @@ -2381,10 +2048,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `TypeRepr` available without any imports */ - given TypeReprMethods: TypeReprMethods = TypeReprMethodsImpl - - /** Implementation of extension methods on `TypeRepr` */ - protected val TypeReprMethodsImpl: TypeReprMethods + given TypeReprMethods: TypeReprMethods /** Extension methods of `TypeRepr` */ trait TypeReprMethods { @@ -2515,10 +2179,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type ConstantType <: TypeRepr /** `TypeTest` that allows testing at runtime in a pattern match if a `TypeRepr` is a `ConstantType` */ - given ConstantTypeTypeTest: TypeTest[TypeRepr, ConstantType] = ConstantTypeTypeTestImpl - - /** Implementation of `ConstantTypeTypeTest` */ - protected val ConstantTypeTypeTestImpl: TypeTest[TypeRepr, ConstantType] + given ConstantTypeTypeTest: TypeTest[TypeRepr, ConstantType] /** Module object of `type ConstantType` */ val ConstantType: ConstantTypeModule @@ -2530,10 +2191,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `ConstantType` available without any imports */ - given ConstantTypeMethods: ConstantTypeMethods = ConstantTypeMethodsImpl - - /** Implementation of extension methods on `ConstantType` */ - protected val ConstantTypeMethodsImpl: ConstantTypeMethods + given ConstantTypeMethods: ConstantTypeMethods /** Extension methods of `ConstantType` */ trait ConstantTypeMethods: @@ -2546,10 +2204,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type TermRef <: TypeRepr /** `TypeTest` that allows testing at runtime in a pattern match if a `TypeRepr` is a `TermRef` */ - given TermRefTypeTest: TypeTest[TypeRepr, TermRef] = TermRefTypeTestImpl - - /** Implementation of `TermRefTypeTest` */ - protected val TermRefTypeTestImpl: TypeTest[TypeRepr, TermRef] + given TermRefTypeTest: TypeTest[TypeRepr, TermRef] /** Module object of `type TermRef` */ val TermRef: TermRefModule @@ -2561,10 +2216,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `TermRef` available without any imports */ - given TermRefMethods: TermRefMethods = TermRefMethodsImpl - - /** Implementation of extension methods on `TermRef` */ - protected val TermRefMethodsImpl: TermRefMethods + given TermRefMethods: TermRefMethods /** Extension methods of `TermRef` */ trait TermRefMethods: @@ -2578,10 +2230,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type TypeRef <: TypeRepr /** `TypeTest` that allows testing at runtime in a pattern match if a `TypeRepr` is a `TypeRef` */ - given TypeRefTypeTest: TypeTest[TypeRepr, TypeRef] = TypeRefTypeTestImpl - - /** Implementation of `TypeRefTypeTest` */ - protected val TypeRefTypeTestImpl: TypeTest[TypeRepr, TypeRef] + given TypeRefTypeTest: TypeTest[TypeRepr, TypeRef] /** Module object of `type TypeRef` */ val TypeRef: TypeRefModule @@ -2592,10 +2241,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `TypeRef` available without any imports */ - given TypeRefMethods: TypeRefMethods = TypeRefMethodsImpl - - /** Implementation of extension methods on `TypeRef` */ - protected val TypeRefMethodsImpl: TypeRefMethods + given TypeRefMethods: TypeRefMethods /** Extension methods of `TypeRef` */ trait TypeRefMethods: @@ -2611,10 +2257,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type SuperType <: TypeRepr /** `TypeTest` that allows testing at runtime in a pattern match if a `TypeRepr` is a `SuperType` */ - given SuperTypeTypeTest: TypeTest[TypeRepr, SuperType] = SuperTypeTypeTestImpl - - /** Implementation of `SuperTypeTypeTest` */ - protected val SuperTypeTypeTestImpl: TypeTest[TypeRepr, SuperType] + given SuperTypeTypeTest: TypeTest[TypeRepr, SuperType] /** Module object of `type SuperType` */ val SuperType: SuperTypeModule @@ -2626,10 +2269,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `SuperType` available without any imports */ - given SuperTypeMethods: SuperTypeMethods = SuperTypeMethodsImpl - - /** Implementation of extension methods on `SuperType` */ - protected val SuperTypeMethodsImpl: SuperTypeMethods + given SuperTypeMethods: SuperTypeMethods /** Extension methods of `SuperType` */ trait SuperTypeMethods { this: SuperTypeMethods => @@ -2643,10 +2283,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type Refinement <: TypeRepr /** `TypeTest` that allows testing at runtime in a pattern match if a `TypeRepr` is a `Refinement` */ - given RefinementTypeTest: TypeTest[TypeRepr, Refinement] = RefinementTypeTestImpl - - /** Implementation of `RefinementTypeTest` */ - protected val RefinementTypeTestImpl: TypeTest[TypeRepr, Refinement] + given RefinementTypeTest: TypeTest[TypeRepr, Refinement] /** Module object of `type Refinement` */ val Refinement: RefinementModule @@ -2658,10 +2295,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `Refinement` available without any imports */ - given RefinementMethods: RefinementMethods = RefinementMethodsImpl - - /** Implementation of extension methods on `Refinement` */ - protected val RefinementMethodsImpl: RefinementMethods + given RefinementMethods: RefinementMethods /** Extension methods of `Refinement` */ trait RefinementMethods: @@ -2676,10 +2310,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type AppliedType <: TypeRepr /** `TypeTest` that allows testing at runtime in a pattern match if a `TypeRepr` is an `AppliedType` */ - given AppliedTypeTypeTest: TypeTest[TypeRepr, AppliedType] = AppliedTypeTypeTestImpl - - /** Implementation of `AppliedTypeTypeTest` */ - protected val AppliedTypeTypeTestImpl: TypeTest[TypeRepr, AppliedType] + given AppliedTypeTypeTest: TypeTest[TypeRepr, AppliedType] /** Module object of `type AppliedType` */ val AppliedType: AppliedTypeModule @@ -2690,10 +2321,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `AppliedType` available without any imports */ - given AppliedTypeMethods: AppliedTypeMethods = AppliedTypeMethodsImpl - - /** Implementation of extension methods on `AppliedType` */ - protected val AppliedTypeMethodsImpl: AppliedTypeMethods + given AppliedTypeMethods: AppliedTypeMethods /** Extension methods of `AppliedType` */ trait AppliedTypeMethods: @@ -2707,10 +2335,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type AnnotatedType <: TypeRepr /** `TypeTest` that allows testing at runtime in a pattern match if a `TypeRepr` is an `AnnotatedType` */ - given AnnotatedTypeTypeTest: TypeTest[TypeRepr, AnnotatedType] = AnnotatedTypeTypeTestImpl - - /** Implementation of `AnnotatedTypeTypeTest` */ - protected val AnnotatedTypeTypeTestImpl: TypeTest[TypeRepr, AnnotatedType] + given AnnotatedTypeTypeTest: TypeTest[TypeRepr, AnnotatedType] /** Module object of `type AnnotatedType` */ val AnnotatedType: AnnotatedTypeModule @@ -2722,10 +2347,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `AnnotatedType` available without any imports */ - given AnnotatedTypeMethods: AnnotatedTypeMethods = AnnotatedTypeMethodsImpl - - /** Implementation of extension methods on `AnnotatedType` */ - protected val AnnotatedTypeMethodsImpl: AnnotatedTypeMethods + given AnnotatedTypeMethods: AnnotatedTypeMethods /** Extension methods of `AnnotatedType` */ trait AnnotatedTypeMethods: @@ -2739,10 +2361,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type AndType <: TypeRepr /** `TypeTest` that allows testing at runtime in a pattern match if a `TypeRepr` is an `AndType` */ - given AndTypeTypeTest: TypeTest[TypeRepr, AndType] = AndTypeTypeTestImpl - - /** Implementation of `AndTypeTypeTest` */ - protected val AndTypeTypeTestImpl: TypeTest[TypeRepr, AndType] + given AndTypeTypeTest: TypeTest[TypeRepr, AndType] /** Module object of `type AndType` */ val AndType: AndTypeModule @@ -2754,10 +2373,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `AndType` available without any imports */ - given AndTypeMethods: AndTypeMethods = AndTypeMethodsImpl - - /** Implementation of extension methods on `AndType` */ - protected val AndTypeMethodsImpl: AndTypeMethods + given AndTypeMethods: AndTypeMethods /** Extension methods of `AndType` */ trait AndTypeMethods: @@ -2771,10 +2387,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type OrType <: TypeRepr /** `TypeTest` that allows testing at runtime in a pattern match if a `TypeRepr` is an `OrType` */ - given OrTypeTypeTest: TypeTest[TypeRepr, OrType] = OrTypeTypeTestImpl - - /** Implementation of `OrTypeTypeTest` */ - protected val OrTypeTypeTestImpl: TypeTest[TypeRepr, OrType] + given OrTypeTypeTest: TypeTest[TypeRepr, OrType] /** Module object of `type OrType` */ val OrType: OrTypeModule @@ -2786,10 +2399,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `OrType` available without any imports */ - given OrTypeMethods: OrTypeMethods = OrTypeMethodsImpl - - /** Implementation of extension methods on `OrType` */ - protected val OrTypeMethodsImpl: OrTypeMethods + given OrTypeMethods: OrTypeMethods /** Extension methods of `OrType` */ trait OrTypeMethods: @@ -2803,10 +2413,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type MatchType <: TypeRepr /** `TypeTest` that allows testing at runtime in a pattern match if a `TypeRepr` is a `MatchType` */ - given MatchTypeTypeTest: TypeTest[TypeRepr, MatchType] = MatchTypeTypeTestImpl - - /** Implementation of `MatchTypeTypeTest` */ - protected val MatchTypeTypeTestImpl: TypeTest[TypeRepr, MatchType] + given MatchTypeTypeTest: TypeTest[TypeRepr, MatchType] /** Module object of `type MatchType` */ val MatchType: MatchTypeModule @@ -2818,10 +2425,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `MatchType` available without any imports */ - given MatchTypeMethods: MatchTypeMethods = MatchTypeMethodsImpl - - /** Implementation of extension methods on `MatchType` */ - protected val MatchTypeMethodsImpl: MatchTypeMethods + given MatchTypeMethods: MatchTypeMethods /** Extension methods of `MatchType` */ trait MatchTypeMethods: @@ -2836,10 +2440,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type ByNameType <: TypeRepr /** `TypeTest` that allows testing at runtime in a pattern match if a `TypeRepr` is a `ByNameType` */ - given ByNameTypeTypeTest: TypeTest[TypeRepr, ByNameType] = ByNameTypeTypeTestImpl - - /** Implementation of `ByNameTypeTypeTest` */ - protected val ByNameTypeTypeTestImpl: TypeTest[TypeRepr, ByNameType] + given ByNameTypeTypeTest: TypeTest[TypeRepr, ByNameType] /** Module object of `type ByNameType` */ val ByNameType: ByNameTypeModule @@ -2851,10 +2452,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `ByNameType` available without any imports */ - given ByNameTypeMethods: ByNameTypeMethods = ByNameTypeMethodsImpl - - /** Implementation of extension methods on `ByNameType` */ - protected val ByNameTypeMethodsImpl: ByNameTypeMethods + given ByNameTypeMethods: ByNameTypeMethods /** Extension methods of `ByNameType` */ trait ByNameTypeMethods: @@ -2867,10 +2465,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type ParamRef <: TypeRepr /** `TypeTest` that allows testing at runtime in a pattern match if a `TypeRepr` is a `ParamRef` */ - given ParamRefTypeTest: TypeTest[TypeRepr, ParamRef] = ParamRefTypeTestImpl - - /** Implementation of `ParamRefTypeTest` */ - protected val ParamRefTypeTestImpl: TypeTest[TypeRepr, ParamRef] + given ParamRefTypeTest: TypeTest[TypeRepr, ParamRef] /** Module object of `type ParamRef` */ val ParamRef: ParamRefModule @@ -2881,10 +2476,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `ParamRef` available without any imports */ - given ParamRefMethods: ParamRefMethods = ParamRefMethodsImpl - - /** Implementation of extension methods on `ParamRef` */ - protected val ParamRefMethodsImpl: ParamRefMethods + given ParamRefMethods: ParamRefMethods /** Extension methods of `ParamRef` */ trait ParamRefMethods: @@ -2898,10 +2490,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type ThisType <: TypeRepr /** `TypeTest` that allows testing at runtime in a pattern match if a `TypeRepr` is a `ThisType` */ - given ThisTypeTypeTest: TypeTest[TypeRepr, ThisType] = ThisTypeTypeTestImpl - - /** Implementation of `ThisTypeTypeTest` */ - protected val ThisTypeTypeTestImpl: TypeTest[TypeRepr, ThisType] + given ThisTypeTypeTest: TypeTest[TypeRepr, ThisType] /** Module object of `type ThisType` */ val ThisType: ThisTypeModule @@ -2912,10 +2501,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `ThisType` available without any imports */ - given ThisTypeMethods: ThisTypeMethods = ThisTypeMethodsImpl - - /** Implementation of extension methods on `ThisType` */ - protected val ThisTypeMethodsImpl: ThisTypeMethods + given ThisTypeMethods: ThisTypeMethods /** Extension methods of `ThisType` */ trait ThisTypeMethods: @@ -2928,10 +2514,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type RecursiveThis <: TypeRepr /** `TypeTest` that allows testing at runtime in a pattern match if a `TypeRepr` is a `RecursiveThis` */ - given RecursiveThisTypeTest: TypeTest[TypeRepr, RecursiveThis] = RecursiveThisTypeTestImpl - - /** Implementation of `RecursiveThisTypeTest` */ - protected val RecursiveThisTypeTestImpl: TypeTest[TypeRepr, RecursiveThis] + given RecursiveThisTypeTest: TypeTest[TypeRepr, RecursiveThis] /** Module object of `type RecursiveThis` */ val RecursiveThis: RecursiveThisModule @@ -2942,10 +2525,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `RecursiveThis` available without any imports */ - given RecursiveThisMethods: RecursiveThisMethods = RecursiveThisMethodsImpl - - /** Implementation of extension methods on `RecursiveThis` */ - protected val RecursiveThisMethodsImpl: RecursiveThisMethods + given RecursiveThisMethods: RecursiveThisMethods /** Extension methods of `RecursiveThis` */ trait RecursiveThisMethods: @@ -2958,10 +2538,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type RecursiveType <: TypeRepr /** `TypeTest` that allows testing at runtime in a pattern match if a `TypeRepr` is a `RecursiveType` */ - given RecursiveTypeTypeTest: TypeTest[TypeRepr, RecursiveType] = RecursiveTypeTypeTestImpl - - /** Implementation of `RecursiveTypeTypeTest` */ - protected val RecursiveTypeTypeTestImpl: TypeTest[TypeRepr, RecursiveType] + given RecursiveTypeTypeTest: TypeTest[TypeRepr, RecursiveType] /** Module object of `type RecursiveType` */ val RecursiveType: RecursiveTypeModule @@ -2983,10 +2560,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `RecursiveType` available without any imports */ - given RecursiveTypeMethods: RecursiveTypeMethods = RecursiveTypeMethodsImpl - - /** Implementation of extension methods on `RecursiveType` */ - protected val RecursiveTypeMethodsImpl: RecursiveTypeMethods + given RecursiveTypeMethods: RecursiveTypeMethods /** Extension methods of `RecursiveType` */ trait RecursiveTypeMethods: @@ -3000,10 +2574,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type MethodType <: TypeRepr /** `TypeTest` that allows testing at runtime in a pattern match if a `TypeRepr` is a `MethodType` */ - given MethodTypeTypeTest: TypeTest[TypeRepr, MethodType] = MethodTypeTypeTestImpl - - /** Implementation of `MethodTypeTypeTest` */ - protected val MethodTypeTypeTestImpl: TypeTest[TypeRepr, MethodType] + given MethodTypeTypeTest: TypeTest[TypeRepr, MethodType] /** Module object of `type MethodType` */ val MethodType: MethodTypeModule @@ -3015,10 +2586,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `MethodType` available without any imports */ - given MethodTypeMethods: MethodTypeMethods = MethodTypeMethodsImpl - - /** Implementation of extension methods on `MethodType` */ - protected val MethodTypeMethodsImpl: MethodTypeMethods + given MethodTypeMethods: MethodTypeMethods /** Extension methods of `MethodType` */ trait MethodTypeMethods: @@ -3036,10 +2604,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type PolyType <: TypeRepr /** `TypeTest` that allows testing at runtime in a pattern match if a `TypeRepr` is a `PolyType` */ - given PolyTypeTypeTest: TypeTest[TypeRepr, PolyType] = PolyTypeTypeTestImpl - - /** Implementation of `PolyTypeTypeTest` */ - protected val PolyTypeTypeTestImpl: TypeTest[TypeRepr, PolyType] + given PolyTypeTypeTest: TypeTest[TypeRepr, PolyType] /** Module object of `type PolyType` */ val PolyType: PolyTypeModule @@ -3051,10 +2616,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `PolyType` available without any imports */ - given PolyTypeMethods: PolyTypeMethods = PolyTypeMethodsImpl - - /** Implementation of extension methods on `PolyType` */ - protected val PolyTypeMethodsImpl: PolyTypeMethods + given PolyTypeMethods: PolyTypeMethods /** Extension methods of `PolyType` */ trait PolyTypeMethods: @@ -3070,10 +2632,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type TypeLambda <: TypeRepr /** `TypeTest` that allows testing at runtime in a pattern match if a `TypeRepr` is a `TypeLambda` */ - given TypeLambdaTypeTest: TypeTest[TypeRepr, TypeLambda] = TypeLambdaTypeTestImpl - - /** Implementation of `TypeLambdaTypeTest` */ - protected val TypeLambdaTypeTestImpl: TypeTest[TypeRepr, TypeLambda] + given TypeLambdaTypeTest: TypeTest[TypeRepr, TypeLambda] /** Module object of `type TypeLambda` */ val TypeLambda: TypeLambdaModule @@ -3085,10 +2644,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `TypeLambda` available without any imports */ - given TypeLambdaMethods: TypeLambdaMethods = TypeLambdaMethodsImpl - - /** Implementation of extension methods on `TypeLambda` */ - protected val TypeLambdaMethodsImpl: TypeLambdaMethods + given TypeLambdaMethods: TypeLambdaMethods /** Extension methods of `TypeLambda` */ trait TypeLambdaMethods: @@ -3106,10 +2662,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type TypeBounds <: TypeRepr /** `TypeTest` that allows testing at runtime in a pattern match if a `TypeRepr` is a `TypeBounds` */ - given TypeBoundsTypeTest: TypeTest[TypeRepr, TypeBounds] = TypeBoundsTypeTestImpl - - /** Implementation of `TypeBoundsTypeTest` */ - protected val TypeBoundsTypeTestImpl: TypeTest[TypeRepr, TypeBounds] + given TypeBoundsTypeTest: TypeTest[TypeRepr, TypeBounds] /** Module object of `type TypeBounds` */ val TypeBounds: TypeBoundsModule @@ -3124,10 +2677,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `TypeBounds` available without any imports */ - given TypeBoundsMethods: TypeBoundsMethods = TypeBoundsMethodsImpl - - /** Implementation of extension methods on `TypeBounds` */ - protected val TypeBoundsMethodsImpl: TypeBoundsMethods + given TypeBoundsMethods: TypeBoundsMethods /** Extension methods of `TypeBounds` */ trait TypeBoundsMethods: @@ -3143,10 +2693,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type NoPrefix <: TypeRepr /** `TypeTest` that allows testing at runtime in a pattern match if a `TypeRepr` is a `NoPrefix` */ - given NoPrefixTypeTest: TypeTest[TypeRepr, NoPrefix] = NoPrefixTypeTestImpl - - /** Implementation of `NoPrefixTypeTest` */ - protected val NoPrefixTypeTestImpl: TypeTest[TypeRepr, NoPrefix] + given NoPrefixTypeTest: TypeTest[TypeRepr, NoPrefix] /** Module object of `type NoPrefix` */ val NoPrefix: NoPrefixModule @@ -3311,10 +2858,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `Constant` available without any imports */ - given ConstantMethods: ConstantMethods = ConstantMethodsImpl - - /** Implementation of extension methods on `Constant` */ - protected val ConstantMethodsImpl: ConstantMethods + given ConstantMethods: ConstantMethods /** Extension methods of `Constant` */ trait ConstantMethods { @@ -3357,18 +2901,12 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type ImplicitSearchResult <: AnyRef /** `TypeTest` that allows testing at runtime in a pattern match if an `ImplicitSearchResult` is an `ImplicitSearchSuccess` */ - given ImplicitSearchSuccessTypeTest: TypeTest[ImplicitSearchResult, ImplicitSearchSuccess] = ImplicitSearchSuccessTypeTestImpl - - /** Implementation of `ImplicitSearchSuccessTypeTest` */ - protected val ImplicitSearchSuccessTypeTestImpl: TypeTest[ImplicitSearchResult, ImplicitSearchSuccess] + given ImplicitSearchSuccessTypeTest: TypeTest[ImplicitSearchResult, ImplicitSearchSuccess] type ImplicitSearchSuccess <: ImplicitSearchResult /** Makes extension methods on `ImplicitSearchSuccess` available without any imports */ - given ImplicitSearchSuccessMethods: ImplicitSearchSuccessMethods = ImplicitSearchSuccessMethodsImpl - - /** Implementation of extension methods on `ImplicitSearchSuccess` */ - protected val ImplicitSearchSuccessMethodsImpl: ImplicitSearchSuccessMethods + given ImplicitSearchSuccessMethods: ImplicitSearchSuccessMethods /** Extension methods of `ImplicitSearchSuccess` */ trait ImplicitSearchSuccessMethods: @@ -3380,16 +2918,10 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type ImplicitSearchFailure <: ImplicitSearchResult /** `TypeTest` that allows testing at runtime in a pattern match if an `ImplicitSearchResult` is an `ImplicitSearchFailure` */ - given ImplicitSearchFailureTypeTest: TypeTest[ImplicitSearchResult, ImplicitSearchFailure] = ImplicitSearchFailureTypeTestImpl - - /** Implementation of `ImplicitSearchFailureTypeTest` */ - protected val ImplicitSearchFailureTypeTestImpl: TypeTest[ImplicitSearchResult, ImplicitSearchFailure] + given ImplicitSearchFailureTypeTest: TypeTest[ImplicitSearchResult, ImplicitSearchFailure] /** Makes extension methods on `ImplicitSearchFailure` available without any imports */ - given ImplicitSearchFailureMethods: ImplicitSearchFailureMethods = ImplicitSearchFailureMethodsImpl - - /** Implementation of extension methods on `ImplicitSearchFailure` */ - protected val ImplicitSearchFailureMethodsImpl: ImplicitSearchFailureMethods + given ImplicitSearchFailureMethods: ImplicitSearchFailureMethods /** Extension methods of `ImplicitSearchFailure` */ trait ImplicitSearchFailureMethods: @@ -3401,26 +2933,17 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => type DivergingImplicit <: ImplicitSearchFailure /** `TypeTest` that allows testing at runtime in a pattern match if an `ImplicitSearchResult` is a `DivergingImplicit` */ - given DivergingImplicitTypeTest: TypeTest[ImplicitSearchResult, DivergingImplicit] = DivergingImplicitTypeTestImpl - - /** Implementation of `DivergingImplicitTypeTest` */ - protected val DivergingImplicitTypeTestImpl: TypeTest[ImplicitSearchResult, DivergingImplicit] + given DivergingImplicitTypeTest: TypeTest[ImplicitSearchResult, DivergingImplicit] type NoMatchingImplicits <: ImplicitSearchFailure /** `TypeTest` that allows testing at runtime in a pattern match if an `ImplicitSearchResult` is a `NoMatchingImplicits` */ - given NoMatchingImplicitsTypeTest: TypeTest[ImplicitSearchResult, NoMatchingImplicits] = NoMatchingImplicitsTypeTestImpl - - /** Implementation of `NoMatchingImplicitsTypeTest` */ - protected val NoMatchingImplicitsTypeTestImpl: TypeTest[ImplicitSearchResult, NoMatchingImplicits] + given NoMatchingImplicitsTypeTest: TypeTest[ImplicitSearchResult, NoMatchingImplicits] type AmbiguousImplicits <: ImplicitSearchFailure /** `TypeTest` that allows testing at runtime in a pattern match if an `ImplicitSearchResult` is an `AmbiguousImplicits` */ - given AmbiguousImplicitsTypeTest: TypeTest[ImplicitSearchResult, AmbiguousImplicits] = AmbiguousImplicitsTypeTestImpl - - /** Implementation of `AmbiguousImplicitsTypeTest` */ - protected val AmbiguousImplicitsTypeTestImpl: TypeTest[ImplicitSearchResult, AmbiguousImplicits] + given AmbiguousImplicitsTypeTest: TypeTest[ImplicitSearchResult, AmbiguousImplicits] ///////////// // SYMBOLS // @@ -3513,10 +3036,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `Symbol` available without any imports */ - given SymbolMethods: SymbolMethods = SymbolMethodsImpl - - /** Implementation of extension methods on `Symbol` */ - protected val SymbolMethodsImpl: SymbolMethods + given SymbolMethods: SymbolMethods /** Extension methods of `Symbol` */ trait SymbolMethods { @@ -3705,10 +3225,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `Signature` available without any imports */ - given SignatureMethods: SignatureMethods = SignatureMethodsImpl - - /** Implementation of extension methods on `Signature` */ - protected val SignatureMethodsImpl: SignatureMethods + given SignatureMethods: SignatureMethods /** Extension methods of `Signature` */ trait SignatureMethods { @@ -4049,10 +3566,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `Flags` available without any imports */ - given FlagsMethods: FlagsMethods = FlagsMethodsImpl - - /** Implementation of extension methods on `Flags` */ - protected val FlagsMethodsImpl: FlagsMethods + given FlagsMethods: FlagsMethods /** Extension methods of `Flags` */ trait FlagsMethods { @@ -4099,10 +3613,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `Position` available without any imports */ - given PositionMethods: PositionMethods = PositionMethodsImpl - - /** Implementation of extension methods on `Position` */ - protected val PositionMethodsImpl: PositionMethods + given PositionMethods: PositionMethods /** Extension methods of `Position` */ trait PositionMethods { @@ -4151,10 +3662,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => } /** Makes extension methods on `SourceFile` available without any imports */ - given SourceFileMethods: SourceFileMethods = SourceFileMethodsImpl - - /** Implementation of extension methods on `SourceFile` */ - protected val SourceFileMethodsImpl: SourceFileMethods + given SourceFileMethods: SourceFileMethods /** Extension methods of `SourceFile` */ trait SourceFileMethods { @@ -4221,10 +3729,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => trait DocumentationModule { this: Documentation.type => } /** Makes extension methods on `Documentation` available without any imports */ - given DocumentationMethods: DocumentationMethods = DocumentationMethodsImpl - - /** Implementation of extension methods on `Documentation` */ - protected val DocumentationMethodsImpl: DocumentationMethods + given DocumentationMethods: DocumentationMethods /** Extension methods of `Documentation` */ trait DocumentationMethods {