File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -4485,18 +4485,14 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
44854485 val containsUninst = new TypeAccumulator [Boolean ]:
44864486 def apply (need : Boolean , tp : Type ): Boolean =
44874487 need || tp.match
4488- case tvar : TypeVar =>
4489- ctx.typerState.constraint.contains(tvar) || tvar.instanceOpt.isInstanceOf [TypeVar ]
4490- case _ =>
4491- foldOver(need, tp)
4488+ case tvar : TypeVar => ! tvar.isInstantiated
4489+ case _ => foldOver(need, tp)
44924490 if (pt1 `ne` pt)
44934491 && (pt1 ne sharpenedPt)
44944492 && ! ctx.mode.is(Mode .ImplicitExploration )
4495- && ! ctx.mode.is(Mode .TypevarsMissContext )
44964493 && ! containsUninst(false , formal)
44974494 && ! isFullyDefined(formal, ForceDegree .none) then
4498- try NoViewsAllowed .constrainResult(tree.symbol, wtp, pt1)
4499- catch case ex : TyperState .BadTyperStateAssertion => report.error(s " Bad typer state: ${ex.getMessage}" , tree.srcPos.endPos)
4495+ NoViewsAllowed .constrainResult(tree.symbol, wtp, pt1)
45004496 val arg = inferImplicitArg(formal, tree.span.endPos)
45014497
45024498 lazy val defaultArg = findDefaultArgument(argIndex)
You can’t perform that action at this time.
0 commit comments