diff options
author | Martin Odersky <odersky@gmail.com> | 2013-06-07 16:11:23 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-06-07 16:11:23 +0200 |
commit | c76cffe04fd690378337971c78736f920b9a479d (patch) | |
tree | f9c390b37bcdc8fcd0b4de470112c41410df74b4 | |
parent | 1571ec5f39cacac6433cce0a140ebfb18e2ac314 (diff) | |
download | dotty-c76cffe04fd690378337971c78736f920b9a479d.tar.gz dotty-c76cffe04fd690378337971c78736f920b9a479d.tar.bz2 dotty-c76cffe04fd690378337971c78736f920b9a479d.zip |
Added `pos` meethod to symbols.
-rw-r--r-- | src/dotty/tools/dotc/core/Symbols.scala | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/Symbols.scala b/src/dotty/tools/dotc/core/Symbols.scala index 34b3eae73..881e86880 100644 --- a/src/dotty/tools/dotc/core/Symbols.scala +++ b/src/dotty/tools/dotc/core/Symbols.scala @@ -377,6 +377,11 @@ object Symbols { private def pickFile(file: AbstractFile, classFile: Boolean): AbstractFile = if ((file eq null) || classFile != (file.path endsWith ".class")) null else file + /** The position of this symbol. + * @pre Symbol was loaded from source + */ + def pos: Position = coord.toPosition + /** The prefix string to be used when displaying this symbol without denotation */ protected def prefixString = "Symbol" |