We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4e0dc0e commit a51a963Copy full SHA for a51a963
compiler/src/dotty/tools/dotc/parsing/Scanners.scala
@@ -192,7 +192,9 @@ object Scanners {
192
/** Returns the closest docstring preceding the position supplied */
193
def getDocComment(pos: Int): Option[Comment] = {
194
def closest(c: Comment, docstrings: List[Comment]): Comment = docstrings match {
195
- case x :: xs if (c.pos.end < x.pos.end && x.pos.end <= pos) => closest(x, xs)
+ case x :: xs =>
196
+ if (c.pos.end < x.pos.end && x.pos.end <= pos) closest(x, xs)
197
+ else closest(c, xs)
198
case Nil => c
199
}
200
0 commit comments