Closed
Description
Given a SourcePosition
pos
where pos.exists
and pos.source.exists
, I would expect that it is safe to call startColumnPadding
on pos
. This is not always the case, as can be seen when building the community lib Lucre
here.
This exception issue occurs at startColumnPadding
in SourceFile.scala
, when content()
is empty, but length
is non-zero.
It seems content().length != length happens when length is computed from Tasty using setLineIndicesFromLineSizes instead of using calculateLineIndicesFromContents.
Originally posted by @olhotak in #14683 (comment)