[Issue 6201] New: [GSoC] Ref Non-Ref overloading doesn't work on structs.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jun 23 13:07:35 PDT 2011


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

           Summary: [GSoC] Ref Non-Ref overloading doesn't work on
                    structs.
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: cristi.cobzarenco at gmail.com


--- Comment #0 from Cristi Cobzarenco <cristi.cobzarenco at gmail.com> 2011-06-23 13:02:46 PDT ---
Code:
struct Test {}

void f( Test x ) {}
void f( ref Test x ) {}

int main() {
    Test x;
    f( x );
    return 0;
}

This fails with:
main.d(8): Error: function main.f called with argument types:
    ((Test))
matches both:
    main.f(Test x)
and:
    main.f(ref Test x)

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