[Issue 19566] New: Warn when the same argument is passed two times, once as ref or out, the other not
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jan 9 12:24:39 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=19566
Issue ID: 19566
Summary: Warn when the same argument is passed two times, once
as ref or out, the other not
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: b2.temp at gmx.com
stuff like this:
```
void stuff(I,O)(const I input, ref O output){}
void other()
{
ubyte[] data;
stuff(data, data);
}
```
are probably a problem and worth a warn, even if `input` is not const.
--
More information about the Digitalmars-d-bugs
mailing list