File tree Expand file tree Collapse file tree 3 files changed +33
-1
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 3 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -5802,7 +5802,7 @@ object Types {
58025802 case Range (infoLo : TypeBounds , infoHi : TypeBounds ) =>
58035803 assert(variance == 0 )
58045804 if (! infoLo.isTypeAlias && ! infoHi.isTypeAlias) propagate(infoLo, infoHi)
5805- else range(defn.NothingType , tp. parent)
5805+ else range(defn.NothingType , parent)
58065806 case Range (infoLo, infoHi) =>
58075807 propagate(infoLo, infoHi)
58085808 case _ =>
Original file line number Diff line number Diff line change 1+ class Inv [M ]
2+
3+ class Module :
4+ type X
5+ type Y
6+ type M = Module {
7+ type X = Module .this .X
8+ type Y = Module .this .Y
9+ }
10+ def expose = new Inv [M ]
11+ def test = this match { case m => m.expose }
12+ // was: leak: `(m : Module)` in `m.expose: Inv[? <: Module { X = m.X }]`
13+ def res : Inv [_ <: Module ] = this match { case m => m.expose }
Original file line number Diff line number Diff line change 1+ trait Module :
2+ self =>
3+ type M <: Module {
4+ type X = self.X
5+ type Y = self.Y
6+ }
7+ type X
8+ type Y
9+
10+ def expose : Expose [X , Y , M ]
11+
12+ trait Expose [
13+ X0 ,
14+ Y0 ,
15+ M <: Module { type X = X0 ; type Y = Y0 }
16+ ]
17+
18+ def test (ms : Seq [Option [Module ]]): Seq [Expose [_, _, _]] =
19+ ms.collect { case Some (module) => module.expose }
You can’t perform that action at this time.
0 commit comments