March 17, 2004 Re: bug compiler message | ||||
---|---|---|---|---|
| ||||
Posted in reply to J C Calvarese | In article <c38ink$2ds$1@digitaldaemon.com>, J C Calvarese says... > >Ant wrote: >> In article <c38de7$2rmi$1@digitaldaemon.com>, J C Calvarese says... >> >>>Ant wrote: >>> >>>>compiler said: >>>> >>>>declaration __anonymous.k is already defined dmd/src/dmd/dsymbol.c line 76 dmd/src/dmd/template.c line 1302 >[...] >> >> I sorry two mistakes on my post >> 1. it's an associative array, >> 2. I changed the code before posting but forgot to copy the compiler >> message again: >> >> foreach(char[] k, TreeIter ; iterMap) >> { >> printf("k = %.*s\n", k); >> } >> // it has "k" instead of "key" >> >> Ant > >Now, I've seen it for myself (WinXP). Wow, that may be the strangest error message I've ever seen. > >Here's the code I used: > >alias int TreeIter; >void main() >{ > char[char[]] iterMap; > foreach(char[] k, TreeIter ; iterMap) > { > printf("k = %.*s\n", k); > } >} > > > >-- >Justin >http://jcc_7.tripod.com/d/ |
Copyright © 1999-2021 by the D Language Foundation