File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -479,6 +479,13 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
479
479
case t : TypeApply => // dotty specific
480
480
generatedType = genTypeApply(t)
481
481
482
+ case inlined @ Inlined (call, bindings, expansion) =>
483
+ if (bindings.isEmpty)
484
+ genLoadTo(expansion, expectedType, dest)
485
+ else
486
+ genInlinedTo(inlined, expectedType, dest)
487
+ generatedDest = dest
488
+
482
489
case _ => abort(s " Unexpected tree in genLoad: $tree/ ${tree.getClass} at: ${tree.span}" )
483
490
}
484
491
@@ -1090,6 +1097,17 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
1090
1097
varsInScope = savedScope
1091
1098
}
1092
1099
1100
+ def genInlinedTo (tree : Inlined , expectedType : BType , dest : LoadDestination ): Unit = tree match {
1101
+ case Inlined (call, bindings, expansion) =>
1102
+
1103
+ val savedScope = varsInScope
1104
+ varsInScope = Nil
1105
+ bindings foreach genStat
1106
+ genLoadTo(expansion, expectedType, dest)
1107
+ emitLocalVarScopes()
1108
+ varsInScope = savedScope
1109
+ }
1110
+
1093
1111
/** Add entries to the `LocalVariableTable` JVM attribute for all the vars in
1094
1112
* `varsInScope`, ending at the current program point.
1095
1113
*/
Original file line number Diff line number Diff line change @@ -897,7 +897,7 @@ object Erasure {
897
897
898
898
override def typedInlined (tree : untpd.Inlined , pt : Type )(using Context ): Tree =
899
899
super .typedInlined(tree, pt) match {
900
- case tree : Inlined => Inlines .dropInlined(tree)
900
+ case tree : Inlined => tree // Inlines.dropInlined(tree)
901
901
}
902
902
903
903
override def typedValDef (vdef : untpd.ValDef , sym : Symbol )(using Context ): Tree =
You can’t perform that action at this time.
0 commit comments