they are not retained. this is a quirk of the way splitting flags like
(s) and (f) work. by default they want to treat the parameter to be
split as a scalar. so just like in your earlier example with the
var2=$var assignment, the shell has to convert var into a single element
for it. to do that it joins the elements using the first character of
IFS, which is a space by default. it's equivalent to this:
... so typeset output very close to original variable creation
keystrokes.
to be clear, typeset is re-quoting everything from scratch because,
again, the shell doesn't store how you quoted things originally. the
quoting style it uses is basically the same as the (q+) style, which is
designed to be minimal (i.e. easier to read). so it will often happen to
match what the way you wrote it, but not necessarily