Skip to content

Commit 2671fe3

Browse files
committed
Make source a field in Positioned nodes
1 parent d084b8b commit 2671fe3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/ast/Positioned.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ abstract class Positioned(implicit @constructorOnly src: SourceFile) extends Src
4646
uniqueId = src.nextId
4747
span = envelope(src)
4848

49-
def source: SourceFile = SourceFile.fromId(uniqueId)
49+
val source: SourceFile = src
5050
def sourcePos(using Context): SourcePosition = source.atSpan(span)
5151

5252
/** This positioned item, widened to `SrcPos`. Used to make clear we only need the

0 commit comments

Comments
 (0)