digitalmars.D.bugs - [Issue 16287] New: update mixin template specs to reflect new import
- via Digitalmars-d-bugs (26/26) Jul 17 2016 https://issues.dlang.org/show_bug.cgi?id=16287
https://issues.dlang.org/show_bug.cgi?id=16287 Issue ID: 16287 Summary: update mixin template specs to reflect new import rules (as of 2.071) Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dlang.org Assignee: nobody puremagic.com Reporter: 2krnk gmx.net mixin template specs https://dlang.org/spec/template-mixin.html currently say: "A TemplateMixin takes an arbitrary set of declarations from the body of a TemplateDeclaration and inserts them into the current context." as import declarations are declarations as well, this would make them available to the current scope. indeed, this used to be the case until DMD 2.071, when walter declared this behavior to be invalid: https://issues.dlang.org/show_bug.cgi?id=15925#c5 now the documentation needs to be changed to explain that a) whole module imports (from the mixed in template) will not be visible in the current scope b) selective imports, however, will be visible in the current scope --
Jul 17 2016