Skip to content

Commit 73ac296

Browse files
committed
Micro optimisation
1 parent 0326a8f commit 73ac296

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -879,8 +879,9 @@ class RefChecks extends MiniPhase { thisPhase =>
879879
}
880880

881881
override def transformNew(tree: New)(implicit ctx: Context) = {
882-
checkUndesiredProperties(tree.tpe.typeSymbol, tree.pos)
883-
currentLevel.enterReference(tree.tpe.typeSymbol, tree.pos)
882+
val sym = tree.tpe.typeSymbol
883+
checkUndesiredProperties(sym, tree.pos)
884+
currentLevel.enterReference(sym, tree.pos)
884885
tree
885886
}
886887
}

0 commit comments

Comments
 (0)