Suggestion to dmd maintainers

Andrei Alexandrescu SeeWebsiteForEmail at erdani.com
Wed Sep 16 20:14:35 UTC 2020


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)`?



More information about the Digitalmars-d mailing list