[Issue 6922] New: [TDPL] superimposing of const and immutable does not work correctly

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Nov 9 14:24:14 PST 2011


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

           Summary: [TDPL] superimposing of const and immutable does not
                    work correctly
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: timon.gehr at gmx.ch


--- Comment #0 from timon.gehr at gmx.ch 2011-11-09 14:23:36 PST ---
>From TDPL, p. 299:
"When two qualifiers are superimposed, D uses simple composition rules. If the
qualifiers are identical, they are collapsed into one. Otherwise,
const(immutable(T)) and immutable(const(T)) are both collapsed into
immutable(T) because that is the most informative type."


However, with DMD 2.056:

static assert(is(immutable(const(T)) == immutable(T)));        // fail.
static assert(is(const(immutable(T)) == immutable(const(T)))); // fail.
static assert(is(const(immutable(T)) == immutable(T)));        // fail.

All three assertions should pass.

-- 
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