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: [email protected]
ReportedBy: [email protected]
--- Comment #0 from [email protected] 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: -------