digitalmars.D - dmd 2.060 ignoring ref for Array arguments
- d coder (20/20) Jul 02 2012 Greetings
Greetings
Normally I use released beta versions of dmd, but this time I started using
dmd 2.060 for sake of std.string.xformat.
But I am facing issues. This version is ignoring "ref" when passing array
as ref argument. Kindly see the code below. When I run this code it prints
"Postblit called!" four time.
Regards
- Puneet
//
struct Foo {
this(this) {
import std.stdio;
writeln("Postblit called!");
}
}
void barArray(ref Foo[4] _f) { /*do nothing*/ }
void main() {
Foo [4] fooArray;
barArray(fooArray);
}
Jul 02 2012








d coder <dlang.coder gmail.com>