Skip to content

Commit 35e6318

Browse files
committed
Another optimization
1 parent 7fe7954 commit 35e6318

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ trait Inferencing { this: Typer =>
413413

414414
val ownedVars = state.ownedVars
415415
if (ownedVars.size > 0) {
416-
val qualifying = ownedVars -- locked
416+
val qualifying = if (locked.isEmpty) ownedVars else ownedVars -- locked
417417
if (!qualifying.isEmpty) {
418418
typr.println(i"interpolate $tree: ${tree.tpe.widen} in $state, owned vars = ${state.ownedVars.toList}%, %, previous = ${locked.toList}%, % / ${state.constraint}")
419419
val resultAlreadyConstrained =

0 commit comments

Comments
 (0)