Skip to content

Commit

Permalink
make hasErrors assertion optional
Browse files Browse the repository at this point in the history
  • Loading branch information
fhackett committed Nov 11, 2024
1 parent ef741b8 commit f89e0de
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Node.scala
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,8 @@ final class Node(val token: Token)(
)

override def hasErrors: Boolean =
val count1 = _errorRefCount > 0
val count2 = errors.nonEmpty
assert(count1 == count2, s"mismatched hasErrors $count1 != $count2")
count1
assertErrorRefCounts()
_errorRefCount > 0

override def errors: List[Node] =
val errorsAcc = mutable.ListBuffer.empty[Node]
Expand Down

0 comments on commit f89e0de

Please sign in to comment.