Skip to content

Commit bf06e15

Browse files
committed
SI-6169 TODO: consolidate with fix for SI-1786 (scala#2518)
1 parent 71c596a commit bf06e15

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/compiler/scala/tools/nsc/typechecker/Typers.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4901,6 +4901,9 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper
49014901
)
49024902
arg match {
49034903
case Bind(_, _) => enhanceBounds()
4904+
// TODO: consolidate fixes for SI-6169 and SI-1786 by dropping the Ident case,
4905+
// in favor of doing sharpenQuantifierBounds for all ExistentialTypes, not just java-defined ones
4906+
// (need to figure out how to sharpen the bounds on creation without running into cycles)
49044907
case Ident(name) if canEnhanceIdent => enhanceBounds()
49054908
case _ =>
49064909
}

src/reflect/scala/reflect/internal/Types.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2693,6 +2693,8 @@ trait Types
26932693
*
26942694
* (Also tried doing this once during class file parsing or when creating the existential type,
26952695
* but that causes cyclic errors because it happens too early.)
2696+
*
2697+
* TODO: figure out how to do this earlier without running into cycles, so this can subsume the fix for SI-1786
26962698
*/
26972699
private def sharpenQuantifierBounds(): Unit = {
26982700
/* Check that we're looking at rawToExistential's handiwork

0 commit comments

Comments
 (0)