We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 860a9ee commit ff3df3cCopy full SHA for ff3df3c
compiler/src/dotty/tools/dotc/typer/Typer.scala
@@ -2831,7 +2831,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
2831
val trees1 = tree.trees.mapconserve: t =>
2832
nestedCtx.gadtState.restore(preGadt)
2833
val res = typed(t, pt)(using nestedCtx)
2834
- gadtConstrs += ctx.gadt
+ gadtConstrs += nestedCtx.gadt
2835
res
2836
.mapconserve(ensureValueTypeOrWildcard)
2837
// Look for the necessary constraint that is subsumed by all alternatives.
0 commit comments