[Issue 21500] public import in mixin template in module a fails when module b imports a.
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Mon Feb  1 20:50:08 UTC 2021
    
    
  
https://issues.dlang.org/show_bug.cgi?id=21500
Max Samukha <maxsamukha at gmail.com> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |maxsamukha at gmail.com
--- Comment #3 from Max Samukha <maxsamukha at gmail.com> ---
How are imported symbols different than other symbols introduced by a mixin?
mixin template baz()
{
    void func() {}
}
void func()
{
}
struct B
{
    mixin baz;
    void foo()
    {
         func();   // oops, baz.func hijacked .func
    }
}
--
    
    
More information about the Digitalmars-d-bugs
mailing list