http://d.puremagic.com/issues/show_bug.cgi?id=2740
[email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #6 from [email protected] 2011-02-19 12:18:10 PST --- (In reply to comment #4) > Hum, I suspect the code above should not even compile. Instantiating the > mixin > "is analogous to cutting and pasting the body of the template into the > location > of the mixin." http://www.digitalmars.com/d/2.0/template-mixin.html > Thus it should be the same as: > > class Foo : IFooable { > bool foo() { return false; } > bool foo() { return false; } > } > > > which should be a semantic error, I think. See > http://d.puremagic.com/issues/show_bug.cgi?id=5312 >From http://www.digitalmars.com/d/2.0/template-mixin.html: "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." In other words, declarations in the current scope always hide declarations in the mixin. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
