Re: hijacking override from template mixin

2014-06-14 Thread sigod via Digitalmars-d-learn
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

Re: hijacking override from template mixin

2014-06-10 Thread Ivan Kazmenko via Digitalmars-d-learn
On Monday, 9 June 2014 at 16:13:50 UTC, monarch_dodra wrote: 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

Re: hijacking override from template mixin

2014-06-09 Thread monarch_dodra via Digitalmars-d-learn
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. AFAIK, the rationale is that *should

hijacking override from template mixin

2014-06-09 Thread Ivan Kazmenko via Digitalmars-d-learn
The D language pays certain attention to avoiding hijacking [1]. So I was surprised when I hijacked a function override from a template mixin by mistake. Here is a commented example. The comments explain the relevant part of the life cycle of the program. - // Start with class A with m