Skip to content

Commit f2df8da

Browse files
committed
add null safety for Option extraction
1 parent 6323252 commit f2df8da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scaladoc/src/dotty/tools/scaladoc/tasty/SymOps.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ object SymOps:
157157
defPosition <- method.symbol.pos
158158
defStart <- scala.util.Try(defPosition.start).toOption
159159
} yield {
160-
method.paramss.partition(_.params.headOption.map(_.symbol.pos.get.start < defStart).getOrElse(false))
160+
method.paramss.partition(_.params.headOption.flatMap(_.symbol.pos.map(_.start < defStart)).getOrElse(false))
161161
}).getOrElse(List.empty, List.empty)
162162

163163
def extendedTypeParams: List[reflect.TypeDef] =

0 commit comments

Comments
 (0)