An interactive shell gets confused (PS1 shown instead of PS2) when using
newline as the first character of the substitution:
$ bash --norc -i <<<$'${\n:;}'
bash-5.2$ ${
bash-5.2$ :;}
----
Things don't seem to work right with an empty funsub:
bash --pretty-print <<<'${ }'
${ ; }
$ bash -c '${ }'
ERROR: AddressSanitizer: heap-buffer-overflow
READ of size 1 at 0x005af9470f1f thread T0
#0 0x56ec06e390 in parse_comsub parse.y:4462:15
#1 0x56ec058344 in read_token_word parse.y:5294:16
#2 0x56ec04c144 in read_token parse.y:3642:12
I'm not sure if it makes sense to accept `${ }' (like `$( )') or not (like
`{ }'). FWIW, mksh accepts both.