summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/reflect/scala/reflect/api/Symbols.scala6
-rw-r--r--src/reflect/scala/reflect/internal/Symbols.scala1
2 files changed, 7 insertions, 0 deletions
diff --git a/src/reflect/scala/reflect/api/Symbols.scala b/src/reflect/scala/reflect/api/Symbols.scala
index 6aa37edc7f..132fa42670 100644
--- a/src/reflect/scala/reflect/api/Symbols.scala
+++ b/src/reflect/scala/reflect/api/Symbols.scala
@@ -386,6 +386,12 @@ trait Symbols extends base.Symbols { self: Universe =>
*/
def knownDirectSubclasses: Set[Symbol]
+ /** The list of all base classes of this type (including its own typeSymbol)
+ * in reverse linearization order, starting with the class itself and ending
+ * in class Any.
+ */
+ def baseClasses: List[Symbol]
+
/** If this symbol is a class or trait, its self type, otherwise the type
* of the symbol itself.
*/
diff --git a/src/reflect/scala/reflect/internal/Symbols.scala b/src/reflect/scala/reflect/internal/Symbols.scala
index 8f99f42494..ecc7c001cc 100644
--- a/src/reflect/scala/reflect/internal/Symbols.scala
+++ b/src/reflect/scala/reflect/internal/Symbols.scala
@@ -75,6 +75,7 @@ trait Symbols extends api.Symbols { self: SymbolTable =>
}
def knownDirectSubclasses = children
+ def baseClasses = info.baseClasses
def thisPrefix: Type = thisType
def selfType: Type = typeOfThis
def typeSignature: Type = info