operator + method

dynamic operator +(
  1. Result other
)

Adds two results together.

Implementation

operator +(Result other) {
  Result current = this;
  if (modifier != null) {
    current = modifier!.modifyOnAdditiveOperation(current, other);
  }

  if (other.modifier != null) {
    other = other.modifier!.modifyOnAdditiveOperation(other, current);
  }

  return Result(
      clean: current.clean + other.clean,
      dirtyParts: _mergeDirtyParts(other.dirtyParts, (a, b) => a + b,
          current: current.dirtyParts));
}