Skip to content

Commit

Permalink
Removed redundant double update for Unexpected errors
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mie6 committed May 21, 2023
1 parent 2d02d92 commit 04fef59
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,8 @@ private [parsley] final class ClassicUnexpectedError(val offset: Int, val line:
override final val flags = if (expected.isEmpty) (DefuncError.ExpectedEmptyMask | DefuncError.TrivialErrorMask).toByte else DefuncError.TrivialErrorMask
override def expectedIterable: Iterable[ExpectItem] = expected
override private [errors] def unexpectedWidth: Int = unexpected.width
override def addLabelsAndReasons(builder: TrivialErrorBuilder): Unit = {
override def makeTrivial(builder: TrivialErrorBuilder): Unit = {
builder.pos_=(line, col)
builder += expected
builder.updateUnexpected(unexpected)
}
Expand Down

0 comments on commit 04fef59

Please sign in to comment.