D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 14064 - Error message about @ attributes incomplete.
Summary: Error message about @ attributes incomplete.
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 minor
Assignee: wolframw
URL:
Keywords: pull, trivial
Depends on:
Blocks:
 
Reported: 2015-01-27 16:56 UTC by Jonathan M Davis
Modified: 2021-07-11 23:43 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Jonathan M Davis 2015-01-27 16:56:55 UTC
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 wolframw 2018-09-23 20:54:26 UTC
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 Dlang Bot 2021-07-09 23:37:49 UTC
@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 Dlang Bot 2021-07-11 23:43:25 UTC
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