digitalmars.D.bugs - [Issue 12248] New: Static arrays have no tail const
- d-bugmail puremagic.com (24/24) Feb 25 2014 https://d.puremagic.com/issues/show_bug.cgi?id=12248
- d-bugmail puremagic.com (7/7) Feb 25 2014 https://d.puremagic.com/issues/show_bug.cgi?id=12248
- d-bugmail puremagic.com (12/21) Feb 25 2014 https://d.puremagic.com/issues/show_bug.cgi?id=12248
- d-bugmail puremagic.com (9/11) Feb 25 2014 https://d.puremagic.com/issues/show_bug.cgi?id=12248
- d-bugmail puremagic.com (13/14) Feb 25 2014 https://d.puremagic.com/issues/show_bug.cgi?id=12248
https://d.puremagic.com/issues/show_bug.cgi?id=12248 Summary: Static arrays have no tail const Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: thecybershadow gmail.com 12:31:51 EET --- immutable(ubyte)[4] and immutable(ubyte[4]) are the same type. As a consequence, this won't compile: alias immutable(ubyte)[40] Hash; Hash[] hashes; hashes.sort; .sort (std.algorithm.sort too) does not compile, as it thinks the array contents is immutable. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 25 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12248 12:34:34 EET --- Wrapping the array in a struct causes .sort to work, but not std.algorithm.sort. Now I'm not sure what the bug is. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 25 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12248 bearophile_hugs eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bearophile_hugs eml.ccimmutable(ubyte)[4] and immutable(ubyte[4]) are the same type. As a consequence, this won't compile: alias immutable(ubyte)[40] Hash; Hash[] hashes; hashes.sort; .sort (std.algorithm.sort too) does not compile, as it thinks the array contents is immutable.This is expected. The values of the array are immutable, so you can't swap them. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 25 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12248Wrapping the array in a struct causes .sort to work, but not std.algorithm.sort. Now I'm not sure what the bug is.Please show the code that shows the difference. Also, never use the built-in sort, it's quite buggy, and it's going to be deprecated, hopefully warned-against in dmd 2.066. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 25 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12248 bearophile_hugs eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALIDPlease show the code that shows the difference.I have found it, filed as Issue 12253 I close this Issue because I think it's not a bug. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 25 2014