sign, which is real mode, looks at a sum's term one by one and stops as soon as it finds one for which it cannot determine the sign. Therefore the same sum a+b can either result in pnz or an error, depending on which variable is declared imaginary:
(%i1) declare(a, imaginary)$
(%i2) sign(a+b);
sign: argument cannot be non-real; found a
-- an error. To debug this try: debugmode(true);
(%i3) (remove(a, imaginary), declare(b, imaginary))$
(%i4) sign(a+b);
(%o4) pnz
This is similar to how the mtimes simplifier once used to return 0 as soon as one factor simplified to 0 - ignoring any potential errors like division by zero or log(0) that might occur during simplification of the remaining factors.
Fixed by commit [77d43d].
Related
Commit: [77d43d]