[Issue 19126] Compiler removes inout on templated parameter and then complains it's not there

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jul 18 10:22:55 UTC 2019


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

Ali Ak <ali.akhtarzada at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|diagnostic                  |

--- Comment #13 from Ali Ak <ali.akhtarzada at gmail.com> ---
Ran in to this again why writing a library. Removing diagnostic because I don't
see why the compiler can't make this edge case work, and marking it as
diagnostic seems to miss the point of the issue.

void f(immutable int) {}
f(3) // works
wrap!(const int)(3) // works
so wrap!(immutable int)(3) should work.

and it does with a hack so why not support it properly?

--


More information about the Digitalmars-d-bugs mailing list