@@ -2398,10 +2398,10 @@ object Types {
23982398
23992399 override def underlying (implicit ctx : Context ): Type = hi
24002400
2401- /** The non-variant type bounds or alias type with given bounds */
2401+ /** The non-alias type bounds type with given bounds */
24022402 def derivedTypeBounds (lo : Type , hi : Type )(implicit ctx : Context ) =
24032403 if ((lo eq this .lo) && (hi eq this .hi) && (variance == 0 )) this
2404- else TypeBounds .real (lo, hi)
2404+ else TypeBounds (lo, hi)
24052405
24062406 /** If this is an alias, a derived alias with the new variance,
24072407 * Otherwise the type itself.
@@ -2419,12 +2419,12 @@ object Types {
24192419 def & (that : TypeBounds )(implicit ctx : Context ): TypeBounds =
24202420 if (this .lo <:< that.lo && that.hi <:< this .hi) that
24212421 else if (that.lo <:< this .lo && this .hi <:< that.hi) this
2422- else TypeBounds .real (this .lo | that.lo, this .hi & that.hi)
2422+ else TypeBounds (this .lo | that.lo, this .hi & that.hi)
24232423
24242424 def | (that : TypeBounds )(implicit ctx : Context ): TypeBounds =
24252425 if (this .lo <:< that.lo && that.hi <:< this .hi) this
24262426 else if (that.lo <:< this .lo && this .hi <:< that.hi) that
2427- else TypeBounds .real (this .lo & that.lo, this .hi | that.hi)
2427+ else TypeBounds (this .lo & that.lo, this .hi | that.hi)
24282428
24292429 override def & (that : Type )(implicit ctx : Context ) = that match {
24302430 case that : TypeBounds => this & that
@@ -2481,14 +2481,14 @@ object Types {
24812481 }
24822482
24832483 object TypeBounds {
2484- def real (lo : Type , hi : Type )(implicit ctx : Context ): TypeBounds =
2484+ def apply (lo : Type , hi : Type )(implicit ctx : Context ): TypeBounds =
24852485 unique(new RealTypeBounds (lo, hi))
24862486 def orAlias (lo : Type , hi : Type )(implicit ctx : Context ): TypeBounds =
24872487 if (lo eq hi) TypeAlias (lo, 0 )
24882488 else unique(new RealTypeBounds (lo, hi))
2489- def empty (implicit ctx : Context ) = real (defn.NothingType , defn.AnyType )
2490- def upper (hi : Type )(implicit ctx : Context ) = real (defn.NothingType , hi)
2491- def lower (lo : Type )(implicit ctx : Context ) = real (lo, defn.AnyType )
2489+ def empty (implicit ctx : Context ) = apply (defn.NothingType , defn.AnyType )
2490+ def upper (hi : Type )(implicit ctx : Context ) = apply (defn.NothingType , hi)
2491+ def lower (lo : Type )(implicit ctx : Context ) = apply (lo, defn.AnyType )
24922492 }
24932493
24942494 object TypeAlias {
0 commit comments