[Issue 13224] Error: first argument is not a symbol

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Jul 29 08:23:21 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=13224

--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> ---
In 2.066, uniform constructor syntax T() is supported for all scalar type T.

 auto n = int();
 auto x = float(3.14);
 alias P = void*;
 auto p = P(&n);

By the feature, the line

   static if (__traits(compiles, mixin("(new " ~ T.stringof ~ "())." ~ names[0]
~ "()")))

is changed to be evaluated to true when names[0] == "Node".

  (new FooTest()).Node() == Node()   (Node == Document.Node == NodeImpl*)

--


More information about the Digitalmars-d-bugs mailing list