--- Comment #2 from 2010-11-26 15:44:29 PST ---
(In reply to comment #1)
> I would expect that this problem would be solved together with however being
> able to use Objects with CTFE and dynamic memory in general is solved. Since, 
> I
> believe that it's essentially the same problem that won't allow you to
> initialize a global variable which is a class type to anything other than 
> null.
> CTFE can't handle the heap yet. Once it can, AAs should work.

In DMD 2.050 this code works, so this enhancement request asks for those
foo_map* to be visible inside foo() only:

string[string] foo_map1;
const string[string] foo_map2;
immutable string[string] foo_map3;
static this() {
    foo_map1 = ["bar" : "spam"];
    foo_map2 = ["bar" : "spam"];
    foo_map3 = ["bar" : "spam"];
void foo() {
    // here use foo_map1, foo_map2, foo_map3
void main() {}

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to