[Issue 10152] New: Refused uint array concat with compatible array literal
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu May 23 09:57:12 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10152
Summary: Refused uint array concat with compatible array
literal
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2013-05-23 09:57:11 PDT ---
This program shows a dis-uniformity that maybe should be removed:
void main() {
void main() {
uint[] a;
a ~= 0; // OK.
a ~= [0]; // OK.
a ~= [-1]; // OK(?)
auto b1 = a ~ 0; // OK.
auto b2 = a ~ [0]; // Error.
}
DMD 2.063beta5 gives:
test.d(7): Error: incompatible types for ((a) ~ ([0])): 'uint[]' and 'int[]'
--
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