www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Suggestion to dmd maintainers

For this declaration:

struct Point(X, Y) { ... }

unittest {
     alias Point = Point!(double, double);
     ...
}

the compiler issues:

Error: alias Point recursive alias declaration

The fix is to prepend a dot:

     alias Point = .Point!(double, double);

That's a rather obscure intervention. So I suggest that the error 
message makes that suggestion wherever sensible, i.e. in this case it 
would read:

Error: alias Point recursive alias declaration, did you mean `alias 
Point = .Point!(double, double)`?
Sep 16 2020