AA.get() problem

Nick Sabalausky a at a.a
Wed May 4 12:36:52 PDT 2011


"bearophile" <bearophileHUGS at lycos.com> wrote in message 
news:ipq6bd$2211$1 at 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 (c in tab) r ~= tab[c]; // OK
>        r ~= tab.get(c, ""); // ERR
>    }
>    writeln(r);
> }
>

On DMD 2.052 Win, that just gives me a linker error:

 Error 42: Symbol Undefined 
_D6object28__T16AssociativeArrayTaTAyaZ16AssociativeArray3getMFaLAyaZAya

Sounds like a bug to me.




More information about the Digitalmars-d-learn mailing list