[Issue 11768] New: inconsistent behavior of type qualifier inout + const

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Dec 18 20:00:50 PST 2013


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

           Summary: inconsistent behavior of type qualifier inout + const
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: wrong-code
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: k.hara.pg at gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 2013-12-18 20:00:45 PST ---
Currently inout(const(T)) should become const(T).

Test case:

void test1(inout int = 0)
{
    const(inout(char)) k1;
    inout(const(char)) k2;
    static assert(typeof(k1).stringof == "const(char)");    // OK
    static assert(typeof(k2).stringof == "const(char)");    // fails
    static assert(is(typeof(k1) == typeof(k2)));            // fails
}

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


More information about the Digitalmars-d-bugs mailing list