Skip to content

Commit 31b91f3

Browse files
committed
Fix typo in tvar instantiation logic
1 parent 18e6a95 commit 31b91f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ object ProtoTypes {
8080
val excluded = ctx.typerState.ownedVars.filter(!_.isInstantiated)
8181
val aboveOK = !ctx.typerState.constraint.dependsOn(tvar, excluded, co = true)
8282
val belowOK = !ctx.typerState.constraint.dependsOn(tvar, excluded, co = false)
83-
if aboveOK then
83+
if belowOK then
8484
tvar.instantiate(fromBelow = true)
85-
else if belowOK then
85+
else if aboveOK then
8686
tvar.instantiate(fromBelow = false)
8787

8888
// commit any remaining changes in typer state

0 commit comments

Comments
 (0)