[Issue 19566] 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
Fri Jan 11 09:25:31 UTC 2019


RazvanN <razvan.nitu1305 at gmail.com> changed:

           What    |Removed                     |Added
                 CC|                            |razvan.nitu1305 at gmail.com

--- Comment #1 from RazvanN <razvan.nitu1305 at gmail.com> ---
This will most likely be marked as invalid. The reasons are:

1. Walter is against warnings. His position, to which I adhere, is that the
compiler should either emit an error or accept the code. Anything in between is
speculation and it depends on what you want to do with your code.

2. There is no way that the code in the bug report will error. That is valid

3. The check for the general case will come with a performance cost for a niche

4. It is a job for static analysis tools to warn us on such code smells, not
that of a compiler.

I suggest we close this as invalid.


More information about the Digitalmars-d-bugs mailing list