diff options
Diffstat (limited to 'src/dotty/tools/dotc')
-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" |