diff options
Diffstat (limited to 'src/dotty/tools/dotc/util/SourceFile.scala')
-rw-r--r-- | src/dotty/tools/dotc/util/SourceFile.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/util/SourceFile.scala b/src/dotty/tools/dotc/util/SourceFile.scala index da2e54132..ac3ee298e 100644 --- a/src/dotty/tools/dotc/util/SourceFile.scala +++ b/src/dotty/tools/dotc/util/SourceFile.scala @@ -113,8 +113,8 @@ case class SourceFile(file: AbstractFile, content: Array[Char]) { def nextLine(offset: Int): Int = lineToOffset(offsetToLine(offset) + 1 min lineIndices.length - 1) - /** The contents of the line containing position `offset` */ - def lineContents(offset: Int): String = + /** The content of the line containing position `offset` */ + def lineContent(offset: Int): String = content.slice(startOfLine(offset), nextLine(offset)).mkString /** The column corresponding to `offset`, starting at 0 */ |