[Issue 1179] Compiler doesn't complain about function redefinition when using template mixin
Aarti_pl
aarti at interia.pl
Tue Apr 24 00:54:21 PDT 2007
d-bugmail at puremagic.com napisał(a):
> http://d.puremagic.com/issues/show_bug.cgi?id=1179
>
>
> bugzilla at digitalmars.com changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> Status|NEW |RESOLVED
> Resolution| |INVALID
>
>
>
>
> ------- Comment #1 from bugzilla at digitalmars.com 2007-04-23 14:04 -------
> This is the way its supposed to work. Each mixin gets its own namespace, so
> that names can match names in the non-mixin declarations and other mixin
> declarations. You can access those conflicting names by using the mixin name as
> a scope operator.
>
>
Probably below cite would be more appropriate to describe why my bug was
invalid: :-)) (I don't know any way to access anonymous mixin members
- if there is a way to do it I would be happy to know how...)
---
Mixin Scope
The declarations in a mixin are 'imported' into the surrounding scope.
If the name of a declaration in a mixin is the same as a declaration in
the surrounding scope, the surrounding declaration overrides the mixin one.
---
Sorry about invalid bug report. Something strange is happening with
mixins in my program, so I thought that it was reason. But it must be
something else. I will try to find it out and report in another bug report.
More information about the Digitalmars-d-bugs
mailing list