[Issue 16287] New: update mixin template specs to reflect new import rules (as of 2.071)
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Jul 17 21:02:42 PDT 2016
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 at puremagic.com
Reporter: 2krnk at 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
--
More information about the Digitalmars-d-bugs
mailing list