Open dduan opened 3 months ago
rdar://132599415
The dirty secret right now is that we don't do any formatting of expressions inside string interpolations. So what you're seeing is us just taking the verbatim text inside the interpolation (newlines and leading space included) and printing it back out, which doesn't work if the indentation of the outer string changes.
There were a couple reasons for that decision:
#if
conditions).
The following test fails. It involves a multi-line string literal that has a tertiary expression. The string literal needs re-indentation, but parts of the tertiary expression's indentation in the result has wrong indentation level.
Failure diagnostics:
Note that the formatted result is syntactically invalid.