www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12068] New: `enum` as `inout` function parameter isn't enough for `inout` return.

https://d.puremagic.com/issues/show_bug.cgi?id=12068

           Summary: `enum` as `inout` function parameter isn't enough for
                    `inout` return.
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: verylonglogin.reg gmail.com


--- Comment #0 from Denis Shelomovskij <verylonglogin.reg gmail.com> 2014-02-03
17:01:01 MSK ---
This code should compile:
---
enum E { a }

inout(int) f(inout E);
---
Error: inout on return means inout must be on a parameter as well for
inout(int)(inout(E))
---

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