[Issue 3826] init of fixed sized arrays
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Mar 10 12:58:35 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3826
Philippe Sigaud <philippe.sigaud at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |philippe.sigaud at gmail.com
--- Comment #1 from Philippe Sigaud <philippe.sigaud at gmail.com> 2010-03-10 21:58:34 CET ---
It's even more general than that: (T[n]).init is T.init. It's not even the
correct type!
That seems wrong to me. It should be a T[n] filled with T.init.
int[2] i2; double[3] d2; char[1] c2; string[0] s2;
writeln(typeof(i2).stringof, " ", typeof(typeof(i2).init).stringof);// int[2]
int
writeln(typeof(d2).stringof, " ", typeof(typeof(d2).init).stringof);//
double[3] double
void f(int a) {}
void g(int[2] a) {}
auto i3 = (int[2]).init;
f(i3); // Works. i3 is of type int.
g(i3); // Does not work. i3 is of type int.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list