[Issue 13129] New: Equality between compatible but differently typed associative arrays
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Jul 14 03:23:10 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=13129
Issue ID: 13129
Summary: Equality between compatible but differently typed
associative arrays
Product: D
Version: D2
Hardware: x86
OS: Windows
Status: NEW
Keywords: rejects-valid
Severity: enhancement
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: bearophile_hugs at eml.cc
void main() {
uint[] a = [1, 2];
byte[] b = [1, 2];
auto r1 = a == b; // OK
uint[int] aa1 = [10: 20];
byte[int] aa2 = [10: 20];
auto r2 = aa1 == aa2; // Error
}
DMD 2.066beta3 gives:
temp.d(7,15): Error: incompatible types for ((aa1) == (aa2)): 'uint[int]' and
'byte[int]'
--
More information about the Digitalmars-d-bugs
mailing list