This is stated in documentation [1]:

immutable long[string] aa = [
  "foo": 5,
  "bar": 10,
  "baz": 2000
];

unittest
{
    assert(aa["foo"] == 5);
    assert(aa["bar"] == 10);
    assert(aa["baz"] == 2000);
}

But results to:

Error: non-constant expression ["foo":5L, "bar":10L, "baz":2000L]

Known bug?
If yes, Is there the need to emend the documentation, till the bug is open?
---
/Paolo

Reply via email to