[SR-7122] Treat non-breaking spaces as regular spaces, with a warning #49670
Labels
compiler
The Swift compiler in itself
good first issue
Good for newcomers
improvement
parser
Area → compiler: The legacy C++ parser
Additional Detail from JIRA
md5: 7aaf5ce8bb056d1cdd2e4c1a2f231c43
Issue Description:
Sometimes a Unicode non-breaking space character (U+00A0) slips into a source file, which can lead to inscrutable errors like this:
(Note that on the command line we can't even highlight the non-breaking space, because we don't know its display width. That's a separate problem.)
It would be nice™ if non-breaking spaces were recognized by the lexer and treated as spaces, with a dedicated warning and fix-it: "non-breaking space (U+00A0) used instead of regular space".
The text was updated successfully, but these errors were encountered: