aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Types.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r--src/dotty/tools/dotc/core/Types.scala39
1 files changed, 0 insertions, 39 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala
index 0a5050148..8595da640 100644
--- a/src/dotty/tools/dotc/core/Types.scala
+++ b/src/dotty/tools/dotc/core/Types.scala
@@ -127,32 +127,6 @@ object Types {
false
}
- /** The realizibility status of this type */
- def realizability(implicit ctx: Context): Realizability = dealias match {
- case tp: TermRef =>
- if (tp.symbol.isRealizable) Realizable else NotStable
- case _: SingletonType | NoPrefix =>
- Realizable
- case tp =>
- def isConcrete(tp: Type): Boolean = tp.dealias match {
- case tp: TypeRef => tp.symbol.isClass
- case tp: TypeProxy => isConcrete(tp.underlying)
- case tp: AndOrType => isConcrete(tp.tp1) && isConcrete(tp.tp2)
- case _ => false
- }
- if (!isConcrete(tp)) NotConcrete
- else {
- def hasBadBounds(mbr: SingleDenotation) = {
- val bounds = mbr.info.bounds
- !(bounds.lo <:< bounds.hi)
- }
- tp.nonClassTypeMembers.find(hasBadBounds) match {
- case Some(mbr) => new HasProblemBounds(mbr)
- case _ => Realizable
- }
- }
- }
-
/** Does this type refer exactly to class symbol `sym`, instead of to a subclass of `sym`?
* Implemented like `isRef`, but follows more types: all type proxies as well as and- and or-types
*/
@@ -3436,19 +3410,6 @@ object Types {
def apply(pre: Type, name: Name)(implicit ctx: Context): Boolean = true
}
- // ----- Realizibility Status -----------------------------------------------------
-
- abstract class Realizability(val msg: String)
-
- object Realizable extends Realizability("")
-
- object NotConcrete extends Realizability("is not a concrete type")
-
- object NotStable extends Realizability("is not a stable reference")
-
- class HasProblemBounds(mbr: SingleDenotation)(implicit ctx: Context)
- extends Realizability(i"has a member $mbr with possibly empty bounds ${mbr.info.bounds.lo} .. ${mbr.info.bounds.hi}")
-
// ----- Exceptions -------------------------------------------------------------
class TypeError(msg: String) extends Exception(msg)