[Issue 12248] Static arrays have no tail const

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Feb 25 02:48:09 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12248


bearophile_hugs at eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs at eml.cc


--- Comment #2 from bearophile_hugs at eml.cc 2014-02-25 02:48:05 PST ---
(In reply to comment #0)
> 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.

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: -------


More information about the Digitalmars-d-bugs mailing list