We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0a04b68 commit be08cecCopy full SHA for be08cec
compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala
@@ -73,10 +73,9 @@ object ProtoTypes {
73
if result && (ctx.typerState.constraint ne newctx.typerState.constraint) then
74
// Remove all type lambdas and tvars introduced by testCompat
75
for tvar <- newctx.typerState.ownedVars do
76
- val tl = tvar.origin.binder
77
- newctx.typerState.ownedVars -= tvar
78
- if newctx.typerState.constraint.contains(tl) then
79
- newctx.typerState.constraint = newctx.typerState.constraint.remove(tl)(using newctx)
+ inContext(newctx):
+ if !tvar.isInstantiated then
+ tvar.instantiate(fromBelow = false) // any direction
80
81
// commit any remaining changes in typer state
82
newctx.typerState.commit()
0 commit comments