Skip to content

Commit ec20869

Browse files
committed
Remove redundant abstraction
1 parent 983eb87 commit ec20869

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ object Inliner {
153153

154154
override def transform(tree: Tree)(implicit ctx: Context): Tree = {
155155
val transformed = reposition(tree match {
156-
case tree: Inlined => transformInline(tree)
156+
case tree: Inlined =>
157+
tpd.seq(transformSub(tree.bindings), transform(tree.expansion)(inlineContext(tree.call)))(ctx.withSource(curSource)) : Tree
157158
case tree: Ident => finalize(tree, untpd.Ident(tree.name)(curSource))
158159
case tree: Literal => finalize(tree, untpd.Literal(tree.const)(curSource))
159160
case tree: This => finalize(tree, untpd.This(tree.qual)(curSource))
@@ -166,12 +167,9 @@ object Inliner {
166167
assert(transformed.isInstanceOf[EmptyTree[_]] || transformed.isInstanceOf[EmptyValDef[_]] || transformed.source == curSource)
167168
transformed
168169
}
169-
def transformInline(tree: Inlined)(implicit ctx: Context): Tree = {
170-
tpd.seq(transformSub(tree.bindings), transform(tree.expansion)(inlineContext(tree.call)))(ctx.withSource(curSource))
171-
}
172170
}
173171

174-
(new Reposition).transformInline(inlined)
172+
(new Reposition).transform(inlined)
175173
}
176174
}
177175

0 commit comments

Comments
 (0)