hijacking override from template mixin
sigod via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Jun 14 10:38:23 PDT 2014
On Monday, 9 June 2014 at 15:54:21 UTC, Ivan Kazmenko wrote:
> I'd expect a "multiple overrides of same function" error, much
> like if I just paste the mixin code by hand. Is that a bug or
> working by design? In the latter case, please explain the
> reasoning.
http://dlang.org/template-mixin.html says:
> 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.
More information about the Digitalmars-d-learn
mailing list