File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
compiler/scala/tools/nsc/typechecker
reflect/scala/reflect/internal Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -4901,6 +4901,9 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper
4901
4901
)
4902
4902
arg match {
4903
4903
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)
4904
4907
case Ident (name) if canEnhanceIdent => enhanceBounds()
4905
4908
case _ =>
4906
4909
}
Original file line number Diff line number Diff line change @@ -2693,6 +2693,8 @@ trait Types
2693
2693
*
2694
2694
* (Also tried doing this once during class file parsing or when creating the existential type,
2695
2695
* 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
2696
2698
*/
2697
2699
private def sharpenQuantifierBounds (): Unit = {
2698
2700
/* Check that we're looking at rawToExistential's handiwork
You can’t perform that action at this time.
0 commit comments