assocArray.remove() gives strange error

Andrej Mitrovic andrej.mitrovich at gmail.com
Fri Dec 24 07:03:56 PST 2010


This has been reported in the bugzilla. remove should return a bool
but it is currently void.

On 12/24/10, Mariusz Gliwiński <alienballance at gmail.com> wrote:
> When i compile:
> <code>type[key2][key1] assocArray1;
> assocArray1[key1].remove(key2);</code>
>
> everything is ok, but building
> <code>type[key2][key1] assocArray1;
> return (assocArray1[key1].remove(key2));</code>
>
> gives
> <code>dmd: expression.c:817: void expToCBuffer(OutBuffer*, HdrGenState*,
> Expression*, PREC): Assertion `pr != PREC_zero' failed.</code>
>
> while the book states it should return bool, which typeof() supports
>
> Digital Mars D Compiler v2.049
> Copyright (c) 1999-2010 by Digital Mars written by Walter Bright
> Documentation: http://www.digitalmars.com/d/2.0/index.html
>
> Sincerely,
> Mariusz Gliwiński
>


More information about the Digitalmars-d mailing list