summaryrefslogtreecommitdiff
path: root/src/reflect
diff options
context:
space:
mode:
Diffstat (limited to 'src/reflect')
-rw-r--r--src/reflect/scala/reflect/api/Types.scala12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/reflect/scala/reflect/api/Types.scala b/src/reflect/scala/reflect/api/Types.scala
index b62a92cbd7..b797c71f6d 100644
--- a/src/reflect/scala/reflect/api/Types.scala
+++ b/src/reflect/scala/reflect/api/Types.scala
@@ -121,7 +121,7 @@ trait Types extends base.Types { self: Universe =>
* class C extends p.D[Int]
* T.asSeenFrom(ThisType(C), D) (where D is owner of m)
* = Int
- * }}}
+ * }}}
*/
def asSeenFrom(pre: Type, clazz: Symbol): Type
@@ -171,6 +171,15 @@ trait Types extends base.Types { self: Universe =>
*/
def widen: Type
+ /** Map to a singleton type which is a subtype of this type.
+ * The fallback implemented here gives:
+ * {{{
+ * T.narrow = (T {}).this.type
+ * }}}
+ * Overridden where we know more about where types come from.
+ */
+ def narrow: Type
+
/** The string discriminator of this type; useful for debugging */
def kind: String
}
@@ -365,4 +374,3 @@ trait Types extends base.Types { self: Universe =>
*/
def existentialAbstraction(tparams: List[Symbol], tpe0: Type): Type
}
-