Skip to content

Commit 9888224

Browse files
committed
Properly inline the closure
1 parent c3e90b8 commit 9888224

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/typer/Inliner.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ object Inliner {
183183
given as Context = ctx.withSource(curSource)
184184

185185
tree match {
186-
case tree: Inlined => transform(Block(tree.bindings, tree.expansion)) // remove Inlined by making them blocks
186+
case tree: Inlined => transform(cpy.Block(tree)(tree.bindings, tree.expansion)) // remove Inlined by making them blocks
187187
case tree: Ident => finalize(untpd.Ident(tree.name)(curSource))
188188
case tree: Literal => finalize(untpd.Literal(tree.const)(curSource))
189189
case tree: This => finalize(untpd.This(tree.qual)(curSource))

library/src/scala/internal/quoted/Matcher.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ private[quoted] object Matcher {
2424
*/
2525
private type Env = Map[Symbol, Symbol]
2626

27-
inline private def withEnv[T](env: Env)(body: => Env ?=> T): T = body(using env)
27+
inline private def withEnv[T](env: Env)(inline body: Env ?=> T): T = body(using env)
2828

2929
class SymBinding(val sym: Symbol, val fromAbove: Boolean)
3030

0 commit comments

Comments
 (0)