[Issue 13763] std.string.representation of immutables
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Sat Oct 13 11:12:57 UTC 2018
    
    
  
https://issues.dlang.org/show_bug.cgi?id=13763
dechcaudron+dlang.issue.tracking at protonmail.com changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |dechcaudron+dlang.issue.tra
                   |                            |cking at protonmail.com
         Resolution|---                         |FIXED
--- Comment #1 from dechcaudron+dlang.issue.tracking at protonmail.com ---
As in DMD v2.082.1, this compiles and executes as expected. Example code:
void main() {
    import std.string: representation;
    import std.stdio;
    enum Enum : char { A = 'a', B='b', C='c'}
    const Enum[] a1 = [Enum.A, Enum.B];
    writeln(a1.representation); // [97, 98]
    immutable Enum[] a2 = [Enum.A, Enum.C];
    writeln(a2.representation); // [97, 99]
}
I am unsure as to whether this was "accidentally" fixed as part of the regular
evolution of Phobos or was reported in a duplicate issue in fixed as a response
to such. Either way, that's one issue less.
--
    
    
More information about the Digitalmars-d-bugs
mailing list