Skip to content

Commit f2e61ce

Browse files
Backport "Adapt toInstantiate in interpolateTypeVars to consider #20399" to LTS (#21112)
Backports #20426 to the LTS branch. PR submitted by the release tooling. [skip ci]
2 parents 7a5f48a + c6ab542 commit f2e61ce

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

+3-1
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,9 @@ trait Inferencing { this: Typer =>
647647
else
648648
typr.println(i"no interpolation for nonvariant $tvar in $state")
649649
)
650-
buf.toList
650+
// constrainIfDependentParamRef could also have instantiated tvars added to buf before the check
651+
buf.filterNot(_._1.isInstantiated).toList
652+
end toInstantiate
651653

652654
def typeVarsIn(xs: ToInstantiate): TypeVars =
653655
xs.foldLeft(SimpleIdentitySet.empty: TypeVars)((tvs, tvi) => tvs + tvi._1)

0 commit comments

Comments
 (0)