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

Nick Treleaven <n...@geany.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |n...@geany.org

--- Comment #2 from Nick Treleaven <n...@geany.org> ---
The error should be improved, but this should not compile. From the spec:

> If two different mixins are put in the same scope, and each define a 
> declaration with the same name, there is an ambiguity error when the 
> declaration is referenced

https://dlang.org/spec/template-mixin.html#mixin_scope

This is to prevent accidental collisions. Instead, you can do this inside class
Foo:

    mixin tempy1 t1;
    mixin tempy2 t2;
    alias points = t1.points;
    alias points = t2.points;

--

Reply via email to