[Issue 2721] New: func(ref X) does not match parameter types (X)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Mar 9 14:53:32 PDT 2009


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

           Summary: func(ref X) does not match parameter types (X)
           Product: D
           Version: unspecified
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: critical
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: kk_tnr at hotmail.com


DMD2.026 on Windows
See this code.

struct S{
}
void main(){
    S s;
    func(s); // work correctly
    func(retS()); //// should not be error.
}
void func(ref S s){
}
S retS(){
    S s;
    return(s);
}

I got this message.
function example.func(ref S s) does not match parameter types (S)
This is definitely a bug.


-- 



More information about the Digitalmars-d-bugs mailing list