File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -4361,7 +4361,13 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
43614361
43624362 def doesntContainsWildcards = {
43634363 val newCtx = ctx.fresh.setNewScope.setReporter(new reporting.ThrowingReporter (NoReporter ))
4364- val pt1 = pt.deepenProtoTrans(using newCtx)
4364+ val substCtxMap = new TypeMap ():
4365+ def apply (tp : Type ): Type = tp match
4366+ case tp : FunProto => mapOver(
4367+ tp.derivedFunProto(resultType = tp.resultType(using newCtx)).withContext(newCtx)
4368+ )
4369+ case tp => mapOver(tp)
4370+ val pt1 = substCtxMap(pt).deepenProtoTrans(using newCtx)
43654371 try {
43664372 isFullyDefined(pt1, ForceDegree .none, ifProto = true )(using newCtx)
43674373 } catch {
You can’t perform that action at this time.
0 commit comments