File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -4268,11 +4268,12 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
4268
4268
)
4269
4269
case _ =>
4270
4270
mapOver(t)
4271
+ val stripedApproxRes = tm(approxRes)
4271
4272
val resultAlreadyConstrained = pt1.isInstanceOf [MethodOrPoly ]
4272
- if (! resultAlreadyConstrained) {
4273
+ if (! resultAlreadyConstrained && ! stripedApproxRes.containsWildcardTypes ) {
4273
4274
if ctx.typerState.isCommittable then
4274
- NoViewsAllowed .constrainResult(tree.symbol, wtp.resultType, tm(approxRes) )
4275
- else constrainResult(tree.symbol, wtp.resultType, tm(approxRes) )
4275
+ NoViewsAllowed .constrainResult(tree.symbol, wtp.resultType, stripedApproxRes )
4276
+ else constrainResult(tree.symbol, wtp.resultType, stripedApproxRes )
4276
4277
}
4277
4278
}
4278
4279
}
You can’t perform that action at this time.
0 commit comments