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

           Summary: [tdpl] out(result) contract should not be able to
                    rebind result
           Product: D
           Version: unspecified
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: and...@metalanguage.com


--- Comment #0 from Andrei Alexandrescu <and...@metalanguage.com> 2009-10-12 
15:45:51 PDT ---
This code compiles and runs:

int fun()
out(result) { result = 2; }
body { return 1; }

However, fun still returns 1 (presumably because "result" is a copy of what
body returned).

The compiler should disallow flat out rebinding of result.

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

Reply via email to