[Issue 1727] Associate Array Literals regression
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Dec 13 02:40:14 PST 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1727
matti.niemenmaa+dbugzilla at iki.fi changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
------- Comment #4 from matti.niemenmaa+dbugzilla at iki.fi 2007-12-13 04:40 -------
It has never compiled, neither in 1.0 nor in 2.0.
http://www.digitalmars.com/d/expression.html#AssocArrayLiteral gives the
example "[21u:"he",38:"ho",2:"hi"];" but doesn't assign it to anything. It also
says "[a]n AssocArrayLiteral cannot be used to statically initialize anything."
This means that code of the form "<associative array type> foo = <associative
array literal>" doesn't work, nor has it ever.
Unless code like the following fails, this is an invalid bug:
int[char[]] a;
static this() {
a = ["aa":1,"bb":2,"cc":3];
}
--
More information about the Digitalmars-d-bugs
mailing list