Stringy Weirdness
1100110
10equals2 at gmail.com
Fri Aug 17 22:11:38 PDT 2012
I haven't been quite able to figure this one out.
string[string][] Dict; //sure ok.
alias string[string][] dict; //Error
void main()
{
Dict = [["Cow":"moo"
],["Duck":"quack"]];//cool
Dict ~= ["Dog":"woof"]
//No prob.
assert(Dict==[["Cow":"moo"],["Duck":"quack"],["Dog":"woof"]]);//looks
legit
dict temp = [["Cow":"moo"
],["Duck":"quack"]];//Error
string[string][] temp2 = [["Cow":"moo"
],["Duck":"quack"]];//Error
//And My favorite one of all:
auto temp2 = [["Cow":"moo"],["Duck":"quack"]]; //Error
}
I've hit stuff like this before, and I've always assumed it was
just karma for screwing with it. I can't figure out why it does
this.
More information about the Digitalmars-d-learn
mailing list