Skip to content

Commit 58993a0

Browse files
committed
return isGround check
1 parent 77a83c6 commit 58993a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4253,7 +4253,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
42534253
def tryConstrainType(pt1: Type): Boolean = {
42544254
val ownedVars = ctx.typerState.ownedVars
42554255
val qualifying = (ownedVars -- locked).toList
4256-
if ((pt1 `ne` pt) && (pt1 ne sharpenedPt) && (ownedVars ne locked) && !ownedVars.isEmpty && qualifying.nonEmpty) {
4256+
if (!formal.isGround && (pt1 `ne` pt) && (pt1 ne sharpenedPt) && (ownedVars ne locked) && !ownedVars.isEmpty && qualifying.nonEmpty) {
42574257
val approxRes = wildApprox(pt1.resultType)
42584258
val tm = new TypeMap:
42594259
def apply(t: Type) = t match

0 commit comments

Comments
 (0)