Skip to content

Commit 2ce11d9

Browse files
committed
Memoize another sourceFile creation site
1 parent 729adc5 commit 2ce11d9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

doc-tool/src/dotty/tools/dottydoc/util/syntax.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ object syntax {
2121

2222
implicit class SymbolExtensions(val sym: Symbol) extends AnyVal {
2323
def sourcePosition(pos: Position)(implicit ctx: Context): SourcePosition =
24-
new SourceFile(sym.sourceFile, Codec(ctx.settings.encoding.value)) atPos pos
25-
24+
ctx.getSource(sym.sourceFile).atPos(pos)
2625
}
2726
}

0 commit comments

Comments
 (0)