Skip to content

Commit 24b2dc7

Browse files
committed
remove resultAlreadyConstrained check
1 parent 480cb8d commit 24b2dc7

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4265,12 +4265,10 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
42654265
)
42664266
case _ =>
42674267
mapOver(t)
4268-
val resultAlreadyConstrained = pt1.isInstanceOf[MethodOrPoly]
42694268
if !formal.isGround
42704269
&& (formal.simplified `ne` formal)
42714270
&& (pt1 `ne` pt)
4272-
&& (pt1 ne sharpenedPt)
4273-
&& !resultAlreadyConstrained then
4271+
&& (pt1 ne sharpenedPt) then
42744272
val approxRes = wildApprox(pt1.resultType)
42754273
val stripedApproxRes = tm(approxRes)
42764274
if !stripedApproxRes.containsWildcardTypes then

0 commit comments

Comments
 (0)