[Issue 7991] New: Regression (2.057): Cannot pass subtype by reference

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Apr 26 13:24:48 PDT 2012


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

           Summary: Regression (2.057): Cannot pass subtype by reference
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: andrej.mitrovich at gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2012-04-26 13:25:52 PDT ---
This used to work in 2.057:

struct Foo { }

struct Bar
{
    Foo foo;
    alias foo this;
}

void test(ref Foo foo) { }

void main()
{
    Bar bar;
    test(bar);
}

But in 2.058 and 2.059:
Error: function test.test (ref Foo foo) is not callable using argument types
(Bar)

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