On Thursday, 25 August 2016 at 17:49:26 UTC, bachmeier wrote:
On Thursday, 25 August 2016 at 15:04:43 UTC, Jonathan M Davis wrote:

Yes. Because the module is compose, within that file, compose will refer to the module, not anything you import. The selective import essentially creates a local alias like

alias compose = std.functional.compose;

as part of the import, so then within that scope, compose refers to that alias and not to the module. You'll run into the same problem any time that you give a module the same name as a symbol that you're importing.

- Jonathan M Davis

Is there a reason there is not a warning for this when compiling? I think it explains a problem I had some time ago that cost me a lot of time.

I mean there should be a better message.

Reply via email to