Renamed but non-selective import?

cc cc at nevernet.com
Tue Jan 12 20:09:28 UTC 2021


Is it possible to import all symbols of a module, while renaming 
just one of them?  It seems like doing an import with renaming 
automatically makes it selective.
In the example below, I'd prefer not to have to use the fully 
qualified name for mymodule.MSG every time e.g.:

import core.sys.windows.windows;
import mymodule; // contains a struct named MSG
Error: `core.sys.windows.winuser.MSG` ... conflicts with 
`mymodule.MSG`

vs

import core.sys.windows.windows : winMSG = MSG; // this leaves 
out other symbols
Error: undefined identifier `HWND`
Error: undefined identifier `LPCSTR`



More information about the Digitalmars-d-learn mailing list