summaryrefslogtreecommitdiff
path: root/src/reflect/scala/reflect/api/Symbols.scala
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-08-27 17:39:54 +0200
committerEugene Burmako <xeno.by@gmail.com>2012-08-27 17:39:54 +0200
commite81cafe1d444e2e2c7422c93f85f1e8382816a6a (patch)
tree247b4c66723b6c3f4b2d999d44626600dcb81f2a /src/reflect/scala/reflect/api/Symbols.scala
parent819ba8c3862b9b85ba5377e68d8f1a87a3bcf105 (diff)
downloadscala-e81cafe1d444e2e2c7422c93f85f1e8382816a6a.tar.gz
scala-e81cafe1d444e2e2c7422c93f85f1e8382816a6a.tar.bz2
scala-e81cafe1d444e2e2c7422c93f85f1e8382816a6a.zip
Exposes Symbol.sourceModule
As discussed, this is not the best API to expose, because this is an implementation detail that might change. However the ship has sailed. We're already imposing the moduleClass <-> sourceModule quirk to the users of our API: Evidence: http://stackoverflow.com/questions/12128783. There are reflection tasks that cannot be pulled without the knowledge of this implementation detail, so we shouldn't pretend that we can change it on a whim and not break anything. Hence I propose to add sourceModule to the public contract and bear the potential consequences.
Diffstat (limited to 'src/reflect/scala/reflect/api/Symbols.scala')
-rw-r--r--src/reflect/scala/reflect/api/Symbols.scala5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/reflect/scala/reflect/api/Symbols.scala b/src/reflect/scala/reflect/api/Symbols.scala
index d000351b36..2673069eef 100644
--- a/src/reflect/scala/reflect/api/Symbols.scala
+++ b/src/reflect/scala/reflect/api/Symbols.scala
@@ -400,6 +400,11 @@ trait Symbols extends base.Symbols { self: Universe =>
*/
def baseClasses: List[Symbol]
+ /** The module corresponding to this module class,
+ * or NoSymbol if this symbol is not a module class.
+ */
+ def module: Symbol
+
/** If this symbol is a class or trait, its self type, otherwise the type
* of the symbol itself.
*/