Skip to content

Commit 9f3c727

Browse files
committed
run constrainResult before implicit search when search type not ground
1 parent 4fe718b commit 9f3c727

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -4252,7 +4252,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
42524252

42534253
val ownedVars = ctx.typerState.ownedVars
42544254
val pt1 = pt.deepenProtoTrans
4255-
if ((formal.simplified `ne` formal) && (pt1 `ne` pt) && (pt1 ne sharpenedPt) && (ownedVars ne locked) && !ownedVars.isEmpty) {
4255+
if ((!formal.isGround) && (formal.simplified `ne` formal) && (pt1 `ne` pt) && (pt1 ne sharpenedPt) && (ownedVars ne locked) && !ownedVars.isEmpty) {
42564256
val qualifying = (ownedVars -- locked).toList
42574257
if (qualifying.nonEmpty) {
42584258
val resultAlreadyConstrained = pt1.isInstanceOf[MethodOrPoly]

0 commit comments

Comments
 (0)