diff --git a/compiler/src/dotty/tools/dotc/quoted/QuoteContextImpl.scala b/compiler/src/dotty/tools/dotc/quoted/QuoteContextImpl.scala index 2afd706e318f..dc9be597036c 100644 --- a/compiler/src/dotty/tools/dotc/quoted/QuoteContextImpl.scala +++ b/compiler/src/dotty/tools/dotc/quoted/QuoteContextImpl.scala @@ -954,13 +954,14 @@ class QuoteContextImpl private (ctx: Context) extends QuoteContext: withDefaultPos(tpd.Select(qualifier, NameKinds.OuterSelectName(name.toTermName, levels))) def copy(original: Tree)(qualifier: Term, name: String, levels: Int): SelectOuter = tpd.cpy.Select(original)(qualifier, NameKinds.OuterSelectName(name.toTermName, levels)) - def unapply(x: SelectOuter): Option[(Term, Int, Type)] = // TODO homogenize order of parameters - Some((x.qualifier, x.level, x.tpe)) + def unapply(x: SelectOuter): Option[(Term, String, Int)] = + Some((x.qualifier, x.name.toString, x.level)) end SelectOuter object SelectOuterMethodsImpl extends SelectOuterMethods: extension (self: SelectOuter): def qualifier: Term = self.qualifier + def name: String = self.name.toString def level: Int = val NameKinds.OuterSelectName(_, levels) = self.name levels diff --git a/library/src/scala/tasty/Reflection.scala b/library/src/scala/tasty/Reflection.scala index 4cab6e126bc4..499892147868 100644 --- a/library/src/scala/tasty/Reflection.scala +++ b/library/src/scala/tasty/Reflection.scala @@ -1107,7 +1107,7 @@ trait Reflection { reflection => trait SelectOuterModule { this: SelectOuter.type => def apply(qualifier: Term, name: String, levels: Int): SelectOuter def copy(original: Tree)(qualifier: Term, name: String, levels: Int): SelectOuter - def unapply(x: SelectOuter): Option[(Term, Int, Type)] // TODO homogenize order of parameters + def unapply(x: SelectOuter): Option[(Term, String, Int)] } given SelectOuterMethods as SelectOuterMethods = SelectOuterMethodsImpl @@ -1116,6 +1116,7 @@ trait Reflection { reflection => trait SelectOuterMethods: extension (self: SelectOuter): def qualifier: Term + def name: String def level: Int end extension end SelectOuterMethods