We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 77a83c6 commit 58993a0Copy full SHA for 58993a0
compiler/src/dotty/tools/dotc/typer/Typer.scala
@@ -4253,7 +4253,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
4253
def tryConstrainType(pt1: Type): Boolean = {
4254
val ownedVars = ctx.typerState.ownedVars
4255
val qualifying = (ownedVars -- locked).toList
4256
- if ((pt1 `ne` pt) && (pt1 ne sharpenedPt) && (ownedVars ne locked) && !ownedVars.isEmpty && qualifying.nonEmpty) {
+ if (!formal.isGround && (pt1 `ne` pt) && (pt1 ne sharpenedPt) && (ownedVars ne locked) && !ownedVars.isEmpty && qualifying.nonEmpty) {
4257
val approxRes = wildApprox(pt1.resultType)
4258
val tm = new TypeMap:
4259
def apply(t: Type) = t match
0 commit comments