[Issue 5028] Problem with named mixins in base class and derived class
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Feb 24 13:29:23 PST 2013
http://d.puremagic.com/issues/show_bug.cgi?id=5028
Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |andrej.mitrovich at gmail.com
--- Comment #5 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-02-24 13:29:19 PST ---
(In reply to comment #2)
> The issue is that this doesn't compile:
> ---
> mixin template T() { final void f() { } }
>
> class A { mixin T ta; }
> class B : A { mixin T tb; }
> ---
This would be an enhancement request though, the spec doesn't say the symbols
are only visible by using 'ta' and 'tb'.
The issue name here is a misnomer, it's unrelated to base/derived classes.
See also:
http://d.puremagic.com/issues/show_bug.cgi?id=8785
http://d.puremagic.com/issues/show_bug.cgi?id=8033
So this would really be an enhancement request to make symbols in mixin
templates unavailable in the current scope when a mixin identifier is used:
mixin template T() { final void f() { } }
class A { mixin T ta; }
class B : A { mixin T tb; }
With the enhancement only A.ta.f() and B.tb.f() would be visible, A.f() and
B.f() would be invisible.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list