[Issue 3390] New: [tdpl] out(result) contract should not be able to rebind result

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Oct 12 15:45:52 PDT 2009


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: nobody at puremagic.com
        ReportedBy: andrei at metalanguage.com


--- Comment #0 from Andrei Alexandrescu <andrei at 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: -------


More information about the Digitalmars-d-bugs mailing list