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

           Summary: Arguments getting nonsensical values in out contract
                    when method is final
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: a...@lycus.org


--- Comment #0 from Alex R´┐Żnne Petersen <a...@lycus.org> 2012-05-23 15:14:34 
CEST ---
The following code is broken:

void main()
{
    auto foo = new class
    {
        final Object doNothing(Object obj)
        out (result) { assert (result is obj); }
        body {
            return obj;
        }
    };
    foo.doNothing(null);
}

The 'obj' parameter is set to some nonsensical value when doNothing() is marked
final. Remove the final and it works as expected.

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

Reply via email to