Why does the following code give a compiler error?

        static int[string] table = ["abc":1, "def":2, "ghi":3];

Error message is:

        prog.d:3: Error: non-constant expression ["abc":1,"def":2,"ghi":3]

How is a literal non-constant?


T

-- 
GEEK = Gatherer of Extremely Enlightening Knowledge

Reply via email to