Skip to content

Commit 33d98ad

Browse files
committed
revert
1 parent fe2a943 commit 33d98ad

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,8 @@ object Inferencing {
231231
def apply(x: Boolean, tp: Type): Boolean = trace(i"isFullyDefined($tp, $force)", typr) {
232232
try {
233233
val tpd = tp.dealias
234-
if tpd ne tp then {
235-
(tpd.isInstanceOf[TypeVar] && tp.isInstanceOf[TypeVar])
236-
|| apply(x, tpd)
237-
} else tp match
234+
if tpd ne tp then apply(x, tpd)
235+
else tp match
238236
case _: WildcardType | _: ProtoType =>
239237
false
240238
case tvar: TypeVar if !tvar.isInstantiated =>

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4373,6 +4373,10 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
43734373
&& (pt1 ne sharpenedPt)
43744374
&& formal.typeSymbol != defn.ClassTagClass
43754375
&& !isFullyDefined(formal, ForceDegree.none)
4376+
&& !formal.existsPart(ty => {
4377+
val dty = ty.dealias
4378+
(dty ne ty) && ty.isInstanceOf[TypeVar] && dty.isInstanceOf[TypeVar]
4379+
}, StopAt.Static, forceLazy = false)
43764380
&& doesntContainsWildcards then
43774381
constrainResult(tree.symbol, wtp, pt1)
43784382
val arg = inferImplicitArg(formal, tree.span.endPos)

0 commit comments

Comments
 (0)