[Issue 6936] New: type combination is not commutative
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Nov 12 04:07:02 PST 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6936
Summary: type combination is not commutative
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-12 04:06:19 PST ---
Tested with DMD 2.056.
const(int[]) x;
const(int)[] y;
static assert(is(typeof(1?x:y) == typeof(1?y:x))); // fail.
Error: static assert (is(const(int)[] == const(int[]))) is false
The static assertion should pass.
I suggest the common type in this case should be const(int)[]. That is
consistent with how type combination works for basic types.
--
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