summaryrefslogtreecommitdiff
path: root/src/reflect/scala/reflect/api/Types.scala
diff options
context:
space:
mode:
authorIulian Dragos <jaguarul@gmail.com>2012-07-21 15:02:40 +0200
committerIulian Dragos <jaguarul@gmail.com>2012-07-23 17:02:03 +0200
commitf2819ff3796427378c4688e13bc0f4a20b550df9 (patch)
treee458ca024c35f147bddb24bd6559da1a1de269a5 /src/reflect/scala/reflect/api/Types.scala
parent40ddd083592ba3947cb5182d6db26798bad9a9cb (diff)
downloadscala-f2819ff3796427378c4688e13bc0f4a20b550df9.tar.gz
scala-f2819ff3796427378c4688e13bc0f4a20b550df9.tar.bz2
scala-f2819ff3796427378c4688e13bc0f4a20b550df9.zip
Small changes to reflection API to make it safe for IDE use.
* Removed `typeSymbol` and `termSymbol` from `reflect.api.base`, and pushed them down to `reflect.api`. * extracted `TypeTree.symbol` to a top-level method so it can be overridden in other layers
Diffstat (limited to 'src/reflect/scala/reflect/api/Types.scala')
-rw-r--r--src/reflect/scala/reflect/api/Types.scala9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/reflect/scala/reflect/api/Types.scala b/src/reflect/scala/reflect/api/Types.scala
index 231b9b248b..01de5fa9a7 100644
--- a/src/reflect/scala/reflect/api/Types.scala
+++ b/src/reflect/scala/reflect/api/Types.scala
@@ -8,6 +8,15 @@ trait Types extends base.Types { self: Universe =>
/** The extended API of types
*/
abstract class TypeApi extends TypeBase {
+ /** The term symbol associated with the type, or `NoSymbol` for types
+ * that do not refer to a term symbol.
+ */
+ def termSymbol: Symbol
+
+ /** The type symbol associated with the type, or `NoSymbol` for types
+ * that do not refer to a type symbol.
+ */
+ def typeSymbol: Symbol
/** The defined or declared members with name `name` in this type;
* an OverloadedSymbol if several exist, NoSymbol if none exist.