operator + method

Obj<num> operator +(
  1. Obj<num> other
)

Adds other to this number.

The result is an Obj of double, as described by double.+, if both this and other is an Obj of double, otherwise the result is a Obj of int.

Implementation

Obj<num> operator +(Obj<num> other) => Obj(value + other.value);