https://issues.dlang.org/show_bug.cgi?id=3858
Adam D. Ruppe <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |[email protected] Resolution|--- |INVALID --- Comment #4 from Adam D. Ruppe <[email protected]> --- I'm gonna go ahead and close this because it isn't really a bug. mixins always work on complete AST nodes. They don't paste in code that modifies future things, it is all self-contained. So you should think of the mixin stuff to be wrapped in {}. Sort of, obviously that's not always literally true but it illustrates the scope limitation. So mixin("private:") is like mixin("{private:}"). that is, it does exactly what it is supposed to do: apply private to the end of the current declaration block... but the current declaration block inside the mixin ends where the mixin ends. Meaning it is just a do-nothing thing, which is perfectly legal! --
