Re: AA.get() problem

2011-05-04 Thread Nick Sabalausky
bearophile bearophileh...@lycos.com wrote in message news:ipq6bd$2211$1...@digitalmars.com... This gives me compilation errors, is this a bug, or is my code wrong? import std.stdio; void main() { string[char] tab = ['e': red, 'b': blue]; string r; foreach (c; aba) { // if

AA.get() problem

2011-05-03 Thread bearophile
This gives me compilation errors, is this a bug, or is my code wrong? import std.stdio; void main() { string[char] tab = ['e': red, 'b': blue]; string r; foreach (c; aba) { // if (c in tab) r ~= tab[c]; // OK r ~= tab.get(c, ); // ERR } writeln(r); } Thank