Change Log: 2.071.2 - D Programming Language

Menu

- Learn
- Documentation
  - Language Reference
  - Library Reference
  - Feature Overview
  - DMD Manual
  - Articles
- Packages
- Community
  - Bug Tracker
  - Forums
  - IRC
  - D on GitHub
  - Wiki
  - Review Queue
  - Twitter
  - More Links
- Resources
  - NEW Library Reference Preview
  - D-Specific Tools
  - Visual D
  - Editors
  - IDEs
  - Tutorials
  - Books
  - The D Style
  - Glossary
  - Acknowledgments
  - Sitemap

Search
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using a local clone.

# Change Log: 2.071.2

Download D 2.071.2 Beta
to be released August 7, 2016

#### Language Changes

1. The allMembers and derivedMembers traits now only return visible symbols.

List of all bug fixes and enhancements in D 2.071.2.

#### Language Changes

1. The allMembers and derivedMembers traits now only return visible symbols.

Since changing the protection system from access to visibility checks (see DIP22), using the getMember traits would often result in spurious deprecation warnings for invisible (private) symbols in allMembers or derivedMembers. As the symbols weren't accessible before and are now invisible, the implementation of the traits was changed to no longer list those.

To ease updating existing code, the old behavior can be restored using the -transition=import compiler switch.

In case you want a template from a library to return private members, you can mixin the template into the instantiation scope. Note that it's possible to mixin normal templates even though they're not declared as mixin template.

Example:

    import std.traits;
    enum UDA;
    struct S
    {
        @UDA int visible;
        @UDA private int invisible;
    }
    // only returns symbols visible from std.traits
    static assert(getSymbolsByUDA!(S, UDA).length == 1);
    // mixin the template instantiation, using a name to avoid namespace pollution
    mixin getSymbolsByUDA!(S, UDA) symbols;
    // as the template is instantiated in the current scope, it can see private members
    static assert(symbols.getSymbolsByUDA.length == 2);

See also Bugzilla 15907

List of all bug fixes and enhancements in D 2.071.2:

#### DMD Compiler regressions

1. Bugzilla 15780: [REG2.069] CTFE foreach fails with tuple
2. Bugzilla 15900: [REG 2.071] (Import deprecation) Public import ignored when using fully qualified name
3. Bugzilla 15907: Unjustified "is not visible from module" deprecation warning when using getMember trait
4. Bugzilla 16085: wrong visibility warning for overloaded alias symbol
5. Bugzilla 16188: [REG2.069] ICE on invalid code
6. Bugzilla 16225: [REG 2.068] Internal error cod1.c 1338 with -O
7. Bugzilla 16316: [REG 2.071] (Import deprecation) fully qualified name of imports in mixin template not accessible
8. Bugzilla 16348: [REG 2.070.2] ICE with package visibility

)
Copyright © 1999-2016 by Digital Mars ®, All Rights Reserved | Page generated by Ddoc on Tue Aug 30 11:23:32 2016