Hello,

void f () {
    static string[string] map = ["1":"un", "2":"du", "3":"tri"];
}
==>
Error: non-constant expression ["1":"un","2":"du","3":"tri"]

I do not understand what is meant, and what I should do. I need 'static', it's 
a constant value for the func.
"static int[] a = [1,2,3];" is OK. Where's the difference?
Also tried const() and immutable(), who knows?, but no way. Search does not 
bring anything for "non-constant expression". (Also: pointer to dmd error 
messages welcome.)

Thank you all,
Denis
-- -- -- -- -- -- --
vit esse estrany ☣

spir.wikidot.com

Reply via email to