Skip to content

Commit 508c2d2

Browse files
author
EnzeXing
committed
Address comments
1 parent e99c982 commit 508c2d2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

compiler/src/dotty/tools/dotc/transform/init/Objects.scala

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1298,13 +1298,14 @@ object Objects:
12981298
case select: Select =>
12991299
eval(select.qualifier, thisV, klass)
13001300

1301-
def implicitValuesBeforeScrutinee(fun: Tree): Contextual[List[ArgInfo]] = fun match
1301+
def implicitArgsBeforeScrutinee(fun: Tree): Contextual[List[ArgInfo]] = fun match
13021302
case Apply(f, implicitArgs) =>
1303-
implicitValuesBeforeScrutinee(f) ++ evalArgs(implicitArgs.map(Arg.apply), thisV, klass)
1303+
implicitArgsBeforeScrutinee(f) ++ evalArgs(implicitArgs.map(Arg.apply), thisV, klass)
13041304
case _ => List()
13051305

1306-
val implicitValuesAfterScrtinee = evalArgs(implicits.map(Arg.apply), thisV, klass)
1307-
val unapplyRes = call(receiver, funRef.symbol, implicitValuesBeforeScrutinee(fun) ++ (TraceValue(scrutinee, summon[Trace]) :: implicitValuesAfterScrtinee), funRef.prefix, superType = NoType, needResolve = true)
1306+
val implicitArgsAfterScrtinee = evalArgs(implicits.map(Arg.apply), thisV, klass)
1307+
val args = implicitArgsBeforeScrutinee(fun) ++ (TraceValue(scrutinee, summon[Trace]) :: implicitArgsAfterScrtinee)
1308+
val unapplyRes = call(receiver, funRef.symbol, args, funRef.prefix, superType = NoType, needResolve = true)
13081309

13091310
if fun.symbol.name == nme.unapplySeq then
13101311
var resultTp = unapplyResTp

0 commit comments

Comments
 (0)