Skip to content

Commit 1b66487

Browse files
committed
address review comments
1 parent bef88b6 commit 1b66487

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
@@ -1505,12 +1505,12 @@ class Inliner(call: tpd.Tree, rhsToInline: tpd.Tree)(using Context) {
15051505
val qual1 = typed(tree.qualifier, shallowSelectionProto(tree.name, pt, this))
15061506
val resNoReduce = untpd.cpy.Select(tree)(qual1, tree.name).withType(tree.typeOpt)
15071507
val reducedProjection = reducer.reduceProjection(resNoReduce)
1508-
if (reducedProjection.isType)
1509-
//in case the projection leads to a typed tree, then there is nothing to reduce
1508+
if reducedProjection.isType then
1509+
//if the projection leads to a typed tree then we stop reduction
15101510
resNoReduce
15111511
else
15121512
val resMaybeReduced = constToLiteral(reducedProjection)
1513-
if (resNoReduce ne resMaybeReduced)
1513+
if resNoReduce ne resMaybeReduced then
15141514
typed(resMaybeReduced, pt) // redo typecheck if reduction changed something
15151515
else
15161516
val res = resMaybeReduced

0 commit comments

Comments
 (0)