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 5a8a61d commit 62df571Copy full SHA for 62df571
compiler/src/dotty/tools/dotc/typer/Applications.scala
@@ -1354,7 +1354,7 @@ trait Applications extends Compatibility {
1354
// Constraining only fails if the pattern cannot possibly match,
1355
// but useless pattern checks detect more such cases, so we simply rely on them instead.
1356
withMode(Mode.GadtConstraintInference)(TypeComparer.constrainPatternType(unapplyArgType, selType))
1357
- val patternBound = maximizeType(unapplyArgType, tree.span)
+ val patternBound = maximizeType(unapplyArgType, unapplyFn.span.endPos)
1358
if (patternBound.nonEmpty) unapplyFn = addBinders(unapplyFn, patternBound)
1359
unapp.println(i"case 2 $unapplyArgType ${ctx.typerState.constraint}")
1360
unapplyArgType
0 commit comments