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

           Summary: with statement doesn't work with functions that return
                    structs
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: andrej.mitrov...@gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrov...@gmail.com> 2011-09-19 
09:14:03 PDT ---
struct Foo { }
Foo foo() { Foo _foo; return _foo; }

void main()
{
    with (foo()) { }
}

Error: foo() is not an lvalue

For me this is particularly a problem when using property functions.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to