Variant[string] assoc array -- runtime error

Graham Fawcett fawcett at uwindsor.ca
Sat Jun 5 23:35:16 PDT 2010


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


More information about the Digitalmars-d mailing list