digitalmars.D.bugs - [Issue 610] New: Undocumented behaviour: ~ and ~= can now concatenate an array with a single element
- d-bugmail puremagic.com (28/28) Nov 27 2006 http://d.puremagic.com/issues/show_bug.cgi?id=610
- d-bugmail puremagic.com (9/9) Dec 03 2006 http://d.puremagic.com/issues/show_bug.cgi?id=610
http://d.puremagic.com/issues/show_bug.cgi?id=610 Summary: Undocumented behaviour: ~ and ~= can now concatenate an array with a single element Product: D Version: 0.175 Platform: All URL: http://www.digitalmars.com/d/expression.html OS/Version: All Status: NEW Keywords: spec Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: smjg iname.com BugsThisDependsOn: 511 Once upon a time, both sides of a ~ had to be arrays of the same type, even though ~= allowed the rvalue to be a single element to be apppended to an array. Now, ~ can also take a single element on one side. For example: ---------- int[] qwert = [ 2, 3, 4, 5, 6 ]; int[] yuiop = qwert ~ 8; int[] asdfg = 10 ~ yuiop; ---------- However, this capability is not documented, either for ~ or for ~=, as far as I can see. --
Nov 27 2006
http://d.puremagic.com/issues/show_bug.cgi?id=610 deewiant gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED Documented for DMD 0.176. --
Dec 03 2006