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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu May 18 09:14:49 PDT 2006


http://d.puremagic.com/bugzilla/show_bug.cgi?id=49





------- Comment #3 from daiphoenix at lycos.com  2006-05-18 11:14 -------
(In reply to comment #2)
> Actually, it isn't clearly defined.  It states:
> "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."
> This leaves open the question of where it's access-checked.  There was a
> discussion on this a while back:
> http://www.digitalmars.com/d/archives/digitalmars/D/bugs/3101.html

In the very next sentenced it is said: 
"It is analogous to cutting and pasting the body of the template into the
location of the mixin." which I think clears it up. Copy&Paste is the semantics
I've been considering as the spec.
(still, this doesn't say anything of whether this is or is not, the ideal
language behavior.)


-- 




More information about the Digitalmars-d-bugs mailing list