We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 18e6a95 commit 31b91f3Copy full SHA for 31b91f3
compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala
@@ -80,9 +80,9 @@ object ProtoTypes {
80
val excluded = ctx.typerState.ownedVars.filter(!_.isInstantiated)
81
val aboveOK = !ctx.typerState.constraint.dependsOn(tvar, excluded, co = true)
82
val belowOK = !ctx.typerState.constraint.dependsOn(tvar, excluded, co = false)
83
- if aboveOK then
+ if belowOK then
84
tvar.instantiate(fromBelow = true)
85
- else if belowOK then
+ else if aboveOK then
86
tvar.instantiate(fromBelow = false)
87
88
// commit any remaining changes in typer state
0 commit comments