Am 29.05.2011 22:21, schrieb Nick Sabalausky: > "David Nadlinger" <[email protected]> wrote in message > news:[email protected]... >> Hello all, >> >> is there a reason bool isn't allowed as key type for associative arrays >> (mtype.c:3995)? The docs don't mention this. >> >> bool-key AAs probably wouldn't be too useful in practice, but it seems >> like a quite arbitrary and unexpected limitation to me - e.g. I would have >> to add special cases to all my Thrift map handling code. >> >> In case this is not on purpose, I'd be happy to put together a pull >> request. >> > > It works for me. I use it all the time as a hash set. What version are you > on? I've been using D2, maybe it's a D1 issue? If so, I'd file a bug report. > > void main() { string[bool] map; }
test.d(2): Error: can't have associative array key of bool
