AA literals/initialisation

Manu turkeyman at gmail.com
Sat Jan 11 20:04:35 PST 2014


On 11 November 2013 21:38, Daniel Murphy <yebblies at nospamgmail.com> wrote:

> "Manu" <turkeyman at gmail.com> wrote in message
> news:mailman.355.1384158631.9546.digitalmars-d at puremagic.com...
> > immutable string[string] priorityMap = [
> > "1" : "blocker",
> > "2" : "critical",
> > "3" : "critical",
> > "4" : "major",
> > "5" : "major",
> > "6" : "major",
> > "7" : "minor",
> > "8" : "minor",
> > "9" : "trivial" ];
> >
> > main.d(56): Error: non-constant expression ["1":"blocker",
> "2":"critical",
> > "3":"critical", "4":"major", "5":"major", "6":"major", "7":"minor",
> > "8":"minor", "9":"trivial"]
> >
> > This is tedious, how long has it been now?
> > Seriously, static map's are super-important, they should be able to be
> > made
> > immutable, and also be able to be initialised.
> >
> > Maybe this could be factored into the improvements for 2.065?
> >
>
> I think yes, it can be done for 2.065.  Someone remind me if we get close
> and it isn't done yet.
>

I've just run into this again today. It's still very annoying.
Consider this a reminder? :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20140112/63af93a0/attachment-0001.html>


More information about the Digitalmars-d mailing list