dmd 2.060 ignoring ref for Array arguments

Jonathan M Davis jmdavisProg at gmx.com
Mon Jul 2 02:42:43 PDT 2012


On Monday, July 02, 2012 14:26:33 d coder wrote:
> 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);
> }

Then report it: http://d.puremagic.com/issues

- Jonathan M Davis


More information about the Digitalmars-d mailing list