May 23, 2013 [Issue 10152] New: Refused uint array concat with compatible array literal | ||||
---|---|---|---|---|
| ||||
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@puremagic.com ReportedBy: bearophile_hugs@eml.cc --- Comment #0 from bearophile_hugs@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: ------- |
Copyright © 1999-2021 by the D Language Foundation