Skip to content

Commit 62df571

Browse files
committed
unapp: Fix Span/Coord when creating patbound symbols
In a modified version of maximizeType I ended up with picking test failures, and this seems to be the right position.
1 parent 5a8a61d commit 62df571

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1354,7 +1354,7 @@ trait Applications extends Compatibility {
13541354
// Constraining only fails if the pattern cannot possibly match,
13551355
// but useless pattern checks detect more such cases, so we simply rely on them instead.
13561356
withMode(Mode.GadtConstraintInference)(TypeComparer.constrainPatternType(unapplyArgType, selType))
1357-
val patternBound = maximizeType(unapplyArgType, tree.span)
1357+
val patternBound = maximizeType(unapplyArgType, unapplyFn.span.endPos)
13581358
if (patternBound.nonEmpty) unapplyFn = addBinders(unapplyFn, patternBound)
13591359
unapp.println(i"case 2 $unapplyArgType ${ctx.typerState.constraint}")
13601360
unapplyArgType

0 commit comments

Comments
 (0)