January 09, 2019 [Issue 19566] New: Warn when the same argument is passed two times, once as ref or out, the other not | ||||
---|---|---|---|---|
| ||||
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@puremagic.com Reporter: b2.temp@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. -- |
Copyright © 1999-2021 by the D Language Foundation