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

--- Comment #0 from Alex R´┐Żnne Petersen <> 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;

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

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to