Variant[string] assoc array -- runtime error
Robert Jacques
sandford at jhu.edu
Sun Jun 6 00:11:45 PDT 2010
On Sun, 06 Jun 2010 02:35:16 -0400, Graham Fawcett <fawcett at uwindsor.ca>
wrote:
> Hi folks,
>
> Is this a new bug or a known one?
>
> // bad.d
> import std.variant;
> void main() {
> Variant b = "something";
> Variant[string] table;
> table["hello"] = b; // line 6
> }
>
> With DMD 2.043, this compiles, but at runtime I get:
>
> core.exception.RangeError at bad(6): Range violation
>
> Graham
I've run into a similar bug before, but as a quick search in bugzilla
didn't turn up anything. (it looks like I forgot to file a bug report for
it) Anyways, I'd recommend filing it:
http://d.puremagic.com/issues/enter_bug.cgi
More information about the Digitalmars-d
mailing list