Skip to content

Commit 7f10cf2

Browse files
committed
Drop ending $ marker when looking for end marker names
1 parent a50e89b commit 7f10cf2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

presentation-compiler/src/main/dotty/tools/pc/PcCollector.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ object EndMarker:
315315
def getPosition(df: NamedDefTree, pos: SourcePosition, sourceText: String)(
316316
implicit ct: Context
317317
): Option[SourcePosition] =
318-
val name = df.name.toString()
318+
val name = df.name.toString().stripSuffix("$")
319319
val endMarkerLine =
320320
sourceText.slice(df.span.start, df.span.end).split('\n').last
321321
val index = endMarkerLine.length() - name.length()

0 commit comments

Comments
 (0)