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