Skip to content

Commit d9cd153

Browse files
dwijnandWojciechMazur
authored andcommitted
Detail the second-pass maximizeType in Space.signature
1 parent 74ab521 commit d9cd153

File tree

1 file changed

+4
-0
lines changed
  • compiler/src/dotty/tools/dotc/transform/patmat

1 file changed

+4
-0
lines changed

compiler/src/dotty/tools/dotc/transform/patmat/Space.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,10 @@ object SpaceEngine {
548548
// which means we can maximise to types that include other type vars
549549
// this fails TreeChecker's "non-empty constraint at end of $fusedPhase" check
550550
// e.g. run-macros/string-context-implicits
551+
// I can't prove that a second call won't also create type vars,
552+
// but I'd rather have an unassigned new-new type var, than an infinite loop.
553+
// After all, there's nothing strictly "wrong" with unassigned type vars,
554+
// it just fails TreeChecker's linting.
551555
maximizeType(mt.paramInfos(0), Spans.NoSpan)
552556
mt
553557
}

0 commit comments

Comments
 (0)