A documentation bug on string escapes

This is from the description of string literals in the Swift 5 Programming Language pages.

interpolated-text-item\ ( expression ) | quoted-text-item
multiline-interpolated-text-item\ ( expression ) | multiline-quoted-text-item

The backslash and left parenthesis don't have the extended-string-literal-delimiter between them. The opening quote, closing quote, escaped single code point, and escaped line break productions all have been updated for "#"-nesting support. The prose and its examples do imply that interpolation blocks should support "#'-nesting.

In other words, the bug is: the formal grammar description says that interpolation blocks are the only string escape that doesn't have "#"-nesting support, while the prose implies that all escapes support "#" nesting.

Terms of Service

Privacy Policy

Cookie Policy