Bug 19995 – parameter attributes are accepted in parameter-less functions

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-06-22T14:05:54Z
Last change time
2019-06-23T02:47:20Z
Keywords
accepts-invalid, pull
Assigned to
No Owner
Creator
Basile-z

Comments

Comment #0 by b2.temp — 2019-06-22T14:05:54Z
--- int test(const @tation) { return 0; } void main() { test(); } --- 1. `tation` isn't even a thing 2. this should be rejected because for example `in` attribute can be a typo in `int`.
Comment #1 by b2.temp — 2019-06-22T14:06:41Z
This used to be rejected anyway : https://run.dlang.io/is/1dX7Kg
Comment #2 by b2.temp — 2019-06-22T14:10:29Z
That's not a reg finally. UDA on params were added in 2.082, explaining why it was rejected in the past.
Comment #3 by dlang-bot — 2019-06-22T18:01:45Z
@Basile-z created dlang/dmd pull request #10074 "fix issue 19995 - parameter attributes are accepted in parameter-less functions" fixing this issue: - fix issue 19995 - parameter attributes are accepted in parameter-less functions https://github.com/dlang/dmd/pull/10074
Comment #4 by dlang-bot — 2019-06-23T02:47:20Z
dlang/dmd pull request #10074 "fix issue 19995 - parameter attributes are accepted in parameter-less functions" was merged into stable: - c30b7f91938bda98dcb15b316a85e54b8db1a92c by Basile Burg: fix issue 19995 - parameter attributes are accepted in parameter-less functions https://github.com/dlang/dmd/pull/10074