[Bug 49] Protection attributes of mixin instances are applied to a the wrong scope.

Bruno Medeiros brunodomedeirosATgmail at SPAM.com
Sat May 20 12:03:25 PDT 2006


d-bugmail at puremagic.com wrote:
> http://d.puremagic.com/bugzilla/show_bug.cgi?id=49
> 
> 
> 
> 
> 
> ------- Comment #4 from smjg at iname.com  2006-05-18 11:37 -------
> The key word is "analogous".  Not "identical".  The differences include several
> of those listed here:
> 
> http://www.digitalmars.com/d/pretod.html#mixins
> 
> Did you even begin to read the thread I just linked to?
> 

Nope, I originally didn't read the thread (did now).

The doc states (like you said):
"Unlike a template instantiation, a template mixin's body is evaluated 
within the scope where the mixin appears, not where the template 
declaration is defined."
I dunno how I missed this before, because I think the statement "a 
mixin's body is evaluated within the scope where the mixin appears" 
should be clear enough. The protection attributes are part of the body, 
and thus are "evaluated" where they appear.


-- 
Bruno Medeiros - CS/E student
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D



More information about the Digitalmars-d-bugs mailing list