March 20, 2014 [Issue 8074] template-mixin example contradicts text | ||||
---|---|---|---|---|
| ||||
https://d.puremagic.com/issues/show_bug.cgi?id=8074 Vladimir Panteleev <thecybershadow@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |thecybershadow@gmail.com --- Comment #8 from Vladimir Panteleev <thecybershadow@gmail.com> 2014-03-20 18:12:45 EET --- I noticed this behavior today: ///////// test.d //////// template T() { void foo(string s) {} } void foo() {} mixin T; void main() { foo("Test"); } ///////////////////////// This will not compile - the module-level foo hides the mixed-in one, which essentially makes the mixin a noop. Is this intentional? It makes it impossible to use mixins to generate additional overloads for a function. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation