Skip to content

Commit 924d35f

Browse files
committed
Cleanup level logic
1 parent 3edf253 commit 924d35f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1880,9 +1880,9 @@ class Inliner(call: tpd.Tree, rhsToInline: tpd.Tree)(using Context) {
18801880
new TreeAccumulator[List[Symbol]] {
18811881
private var level = -1
18821882
override def apply(syms: List[Symbol], tree: tpd.Tree)(using Context): List[Symbol] =
1883-
if (level != -1) foldOver(syms, tree)
1883+
if level != -1 then foldOver(syms, tree)
18841884
else tree match {
1885-
case tree: RefTree if level == -1 && tree.symbol.isDefinedInCurrentRun && !tree.symbol.isLocal =>
1885+
case tree: RefTree if tree.symbol.isDefinedInCurrentRun && !tree.symbol.isLocal =>
18861886
foldOver(tree.symbol :: syms, tree)
18871887
case Quoted(body) =>
18881888
level += 1
@@ -1896,7 +1896,7 @@ class Inliner(call: tpd.Tree, rhsToInline: tpd.Tree)(using Context) {
18961896
level -= 1
18971897
try apply(syms, body)
18981898
finally level += 1
1899-
case TypeApply(fun, _) if level == -1 =>
1899+
case TypeApply(fun, _) =>
19001900
apply(syms, fun)
19011901
case _ =>
19021902
foldOver(syms, tree)

0 commit comments

Comments
 (0)