www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11514] New: `inout` is incorrectly resolved as `const` if there is a default parameter

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

           Summary: `inout` is incorrectly resolved as `const` if there is
                    a default parameter
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: verylonglogin.reg gmail.com


--- Comment #0 from Denis Shelomovskij <verylonglogin.reg gmail.com> 2013-11-14
18:35:47 MSK ---
There should be no errors:
---
inout(Object) f(inout(Object), inout int = 0) { return null; }

static assert(is(typeof(f(Object.init)) == Object));
---
Error: static assert  (is(const(Object) == Object)) is false
---

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