Bug 14064 – Error message about @ attributes incomplete.

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-01-27T16:56:55Z
Last change time
2021-07-11T23:43:25Z
Keywords
pull, trivial
Assigned to
wolframw
Creator
Jonathan M Davis

Comments

Comment #0 by issues.dlang — 2015-01-27T16:56:55Z
This code @deprecated void func() {} void main() {} results in this error: q.d(1): Error: @identifier or @(ArgumentList) expected, not @deprecated q.d(1): Error: valid attributes are @property, @safe, @trusted, @system, @disable Notice that the list of valid @ attributes is missing @nogc (presumably, because it's new). Also, if the change for issue# 13388 doesn't get reverted, then @nothrow, @pure, and @return will need to be added to the list. Ideally, I would think that the error message would treat the problem a bit like happens with a spelling error for variables, and ask if you meant "deprecated" instead of "@deprecated" - at least as long as @deprecated hasn't been declared as a UDA anyway - but if we're going to give a list of built-in attributes with @, the list should be correct and complete.
Comment #1 by wolframw — 2018-09-23T20:54:26Z
The missing @nogc has already been fixed by https://github.com/dlang/dmd/pull/6084 However, no spell checker exists yet, so I'll make one.
Comment #2 by dlang-bot — 2021-07-09T23:37:49Z
@dkorpel created dlang/dmd pull request #12852 "Fix issue 14064 - Error message about @ attributes incomplete" fixing this issue: - fix issue 14064 - message about @ attributes https://github.com/dlang/dmd/pull/12852
Comment #3 by dlang-bot — 2021-07-11T23:43:25Z
dlang/dmd pull request #12852 "Fix issue 14064 - Error message about @ attributes incomplete" was merged into master: - 425198c9b56485026b07dc2443ccf911232509f0 by dkorpel: fix issue 14064 - message about @ attributes https://github.com/dlang/dmd/pull/12852