[Issue 21062] Compiler produces wildly different diagnostics based on variable names

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jul 21 07:18:14 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=21062

Basile-z <b2.temp at gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
                 CC|                            |b2.temp at gmx.com
            Summary|Diagnostic for              |Compiler produces wildly
                   |'synchronized' used as a    |different diagnostics based
                   |variable name should be     |on variable names
                   |improved                    |

--- Comment #2 from Basile-z <b2.temp at gmx.com> ---
yeah it's a keyword, so parser error. Maybe just

"cannot use `%s` as identifier because this is a keyword"

and as errorSupplemental()

"append a trailing underscore"

--


More information about the Digitalmars-d-bugs mailing list