No property error message

ric maicle via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Mar 19 11:36:10 PDT 2016


I got an error message with the following code saying:

   Error: no property 'length' for type 'int[string]'

Shouldn't the error message say 'length()'?

~~~
import std.stdio;

void main() {
   int[string] a;
   a["one"] = 1;
   a["two"] = 2;
   a["three"] = 3;
   auto len = a.length();
}
~~~

DMD 2.070.2


More information about the Digitalmars-d-learn mailing list