Re: Initialize associate array

2016-02-29 Thread Adam D. Ruppe via Digitalmars-d-learn
Use a constructor instead.

Re: Initialize associate array

2016-02-29 Thread cym13 via Digitalmars-d-learn
On Monday, 29 February 2016 at 21:03:46 UTC, pham wrote: Should codes below be compiled? import std.stdio; class Test { enum string[string] WorkAA = [ "foo": "work" ]; immutable string[string] NotWorkAA1 = [ "foo": "not wo

Initialize associate array

2016-02-29 Thread pham via Digitalmars-d-learn
Should codes below be compiled? import std.stdio; class Test { enum string[string] WorkAA = [ "foo": "work" ]; immutable string[string] NotWorkAA1 = [ "foo": "not work" ]; string[string] NotWorkAA2 =