Skip to content

Commit 70ead5c

Browse files
dwijnandWojciechMazur
authored andcommitted
Detail the second-pass maximizeType in Space.signature
[Cherry-picked 5b425ee]
1 parent aef1e2e commit 70ead5c

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
@@ -539,6 +539,10 @@ object SpaceEngine {
539539
// which means we can maximise to types that include other type vars
540540
// this fails TreeChecker's "non-empty constraint at end of $fusedPhase" check
541541
// e.g. run-macros/string-context-implicits
542+
// I can't prove that a second call won't also create type vars,
543+
// but I'd rather have an unassigned new-new type var, than an infinite loop.
544+
// After all, there's nothing strictly "wrong" with unassigned type vars,
545+
// it just fails TreeChecker's linting.
542546
maximizeType(mt.paramInfos(0), Spans.NoSpan)
543547
mt
544548
}

0 commit comments

Comments
 (0)