OK, so I misidentified the issue and screwed up my bug report.
The shell is pdksh on OpenBSD, and the real issue is with parentheses:
$ a=1 $ b=2 $ echo "${a+($b)}" ksh: ${a+($b)}": bad substitution $ echo "${a+\($b\)}" (2)
OK, so I misidentified the issue and screwed up my bug report.
The shell is pdksh on OpenBSD, and the real issue is with parentheses:
$ a=1
$ b=2
$ echo "${a+($b)}"
ksh: ${a+($b)}": bad substitution
$ echo "${a+\($b\)}"
(2)