Skip to content

Commit 2aa559a

Browse files
committed
Added missing generated destination and used dropInlined to correctly transform an inlined node
1 parent 028c6bf commit 2aa559a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import dotty.tools.dotc.core.Contexts._
2525
import dotty.tools.dotc.core.Phases._
2626
import dotty.tools.dotc.core.Decorators.em
2727
import dotty.tools.dotc.report
28+
import dotty.tools.dotc.inlines.Inlines
2829

2930
/*
3031
*
@@ -479,8 +480,9 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
479480
case t: TypeApply => // dotty specific
480481
generatedType = genTypeApply(t)
481482

482-
case inlined @ Inlined(call, bindings, expansion) =>
483-
genLoadTo(Block(bindings, expansion), expectedType, dest)
483+
case inlined @ Inlined(_, _, _) =>
484+
genLoadTo(Inlines.dropInlined(inlined) , expectedType, dest)
485+
generatedDest = dest
484486

485487
case _ => abort(s"Unexpected tree in genLoad: $tree/${tree.getClass} at: ${tree.span}")
486488
}

0 commit comments

Comments
 (0)