On 27.08.19 18:12, berni wrote:
import std.stdio;
void main()
{
real[int] a;
a[0] += 100;
writeln(a);
}
results (independed of the used compiler) in
[0:100]
I was a little bit surprised, because a[0] += 100 should be the same as
a[0] = a[0]+100, which leads to a range violation error. Furthermore, as
we work with real, I'd expected the result to be NaN...
Is this a bug? I ask, because it would be quite convenient to use it the
way it works now.
For what it's worth, it's in Bugzilla:
https://issues.dlang.org/show_bug.cgi?id=4463