[Issue 9049] New: std.typecons.Proxy doesn't treat ref parameter correctly.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Nov 20 06:37:35 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=9049

           Summary: std.typecons.Proxy doesn't treat ref parameter
                    correctly.
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: zan77137 at nifty.com


--- Comment #0 from SHOO <zan77137 at nifty.com> 2012-11-20 06:37:34 PST ---
This code doesn't work:
-------------------------------------
import std.typecons, std.stdio;

struct A {
    void foo(ref ubyte[] a) { a = [1]; }
}
struct B {
    A a;
    mixin Proxy!a;
}
void main() {
    B b;
    ubyte[] a;
    b.foo(a);
    assert(a.length == 1);
}
-------------------------------------

-- 
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