[Issue 10482] Regression (2.063): Compiler doesn't warn about prefix const
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri May 2 07:08:16 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=10482
--- Comment #9 from Andrej Mitrovic <andrej.mitrovich at gmail.com> ---
Another case from the IRC by someone new to D:
-----
import std.stdio;
int hidden[4];
ref const int[4] getConstHidden()
{
return hidden;
}
void main()
{
writeln(hidden);
foreach (ref i; getConstHidden())
i = 1;
writeln(hidden);
}
-----
This needs to be fixed.
--
More information about the Digitalmars-d-bugs
mailing list