[Issue 17405] [module] Named module import bypass global

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed May 17 00:28:02 PDT 2017


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

Ketmar Dark <ketmar at ketmar.no-ip.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |ketmar at ketmar.no-ip.org
         Resolution|---                         |INVALID

--- Comment #1 from Ketmar Dark <ketmar at ketmar.no-ip.org> ---
what your `import b = baz : foo;` actually does is this:

1. import module baz, and rename it (the module itself!) to `b`.
2. import baz's symbols into the local scope.

what you probably wanted to do is: `import baz : b = foo;` -- this way `foo`
will be renamed, not `baz`.

i'm closing this bug for now, but feel free to reopen it if i misunderstood
you.

--


More information about the Digitalmars-d-bugs mailing list