[Issue 19995] New: [REG 2.082] parameter attributes are accepted in parameter-less functions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jun 22 14:05:54 UTC 2019


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

          Issue ID: 19995
           Summary: [REG 2.082] parameter attributes are accepted in
                    parameter-less functions
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: accepts-invalid
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: b2.temp at gmx.com

---
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`.

--


More information about the Digitalmars-d-bugs mailing list