Change Log: 2.099.1 - D Programming Language

Menu

- Learn
- Documentation
  - Language Reference
  - Library Reference
  - Command-line Reference
  - Feature Overview
  - Articles
- Downloads
- Packages
- Community
  - Blog
  - Orgs using D
  - Twitter
  - Forums
  - IRC
  - Community Discord
  - Wiki
  - GitHub
  - Issues
  - Get involved
  - Contributors
  - Foundation
  - Security Team
  - Donate
  - Sponsors
- Resources
  - Tour
  - Books
  - Tutorials
  - Tools
  - Editors
  - IDEs
  - run.dlang.io
  - Visual D
  - Acknowledgments
  - D Style
  - Glossary
  - 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.099.1

Download D 2.099.1
released Apr 07, 2022

2.099.1 comes with 2 major changes and 21 fixed Bugzilla issues. A huge thanks goes to the 12 contributors who made 2.099.1 possible.

#### Compiler changes

1. Special case for __traits(parameters) in foreach loops was removed

#### Library changes

1. std.experimental.logger default level changed to info instead of warning

List of all bug fixes and enhancements in D 2.099.1.

#### Compiler changes

1. Special case for __traits(parameters) in foreach loops was removed

   Previously, when used inside a foreach using an overloaded opApply, the trait would yield the parameters to the delegate and not the function the foreach appears within.

   This behaviour is unintuitive, especially when the type of the foreach aggregate depends on a template parameter. Hence __traits(parameters) was changed to consistently return the parameters of the lexically enclosing function.

       class Tree {
           int opApply(int delegate(size_t, Tree) dg) {
               if (dg(0, this)) return 1;
               return 0;
           }
       }
       void useOpApply(Tree top, int x)
       {
           foreach(idx; 0..5)
           {
               static assert(is(typeof(__traits(parameters)) == AliasSeq!(Tree, int)));
           }

           foreach(idx, elem; top)
           {
               // Previously:
               // static assert(is(typeof(__traits(parameters)) == AliasSeq!(size_t, Tree)));

               // Now:
               static assert(is(typeof(__traits(parameters)) == AliasSeq!(Tree, int)));
           }
       }

#### Library changes

1. std.experimental.logger default level changed to info instead of warning

   In the 2.099.0 release, the default log level was changed to warning.

   However, this was erroneously assumed to include info (informational) logs as well. Now it does include info log messages.

List of all bug fixes and enhancements in D 2.099.1:

#### DMD Compiler regression fixes

1. Bugzilla 17434: [REG: 2.073] import lookup ignores public import.
2. Bugzilla 20015: [REG 2.086] Deprecated -preview, -revert, and -transition options not documented
3. Bugzilla 20717: Unsilenced bogus "undefined identifier" error from speculative collision
4. Bugzilla 21285: Delegate covariance broken between 2.092 and 2.094 (git master).
5. Bugzilla 22175: assert fail when struct assignment value is desired and struct size is odd
6. Bugzilla 22639: Copy constructors with default arguments not getting called
7. Bugzilla 22858: [REG2.099] Incorrect alignment of void*[0]
8. Bugzilla 22859: Error: forward reference of variable isAssignable for mutually recursed allSatisfy
9. Bugzilla 22860: Error: unknown with mutually recursive and nested SumType
10. Bugzilla 22863: [REG2.099] -main doesn't work anymore when used for linking only (without source modules)
11. Bugzilla 22969: Can't mixin name of manifest constant on right-hand side of alias declaration

#### DMD Compiler bug fixes

1. Bugzilla 22852: importC: Lexer allows invalid wysiwyg and hex strings
2. Bugzilla 22853: importC: Lexer allows nesting block comments
3. Bugzilla 22868: __traits(parameters) returns parameters of delegate instead of function
4. Bugzilla 22871: Using an alias to __traits(parameters) causes unknown error
5. Bugzilla 22939: bad error message: Error: no property msg for type string
6. Bugzilla 22942: Invalid section type / offset for newer XCode versions
7. Bugzilla 22993: Missing quotes in octal literal hint

#### Druntime regression fixes

1. Bugzilla 20778: exception messages with nulls within are treated inconsistently

#### Druntime enhancements

1. Bugzilla 22908: OpenBSD: Add getpwnam_shadow and getpwuid_shadow function prototypes

#### dlang.org bug fixes

1. Bugzilla 21086: Wrong source link for core.thread.context

### Contributors to this release (12)

A huge thanks goes to all the awesome people who made this release possible.

- Boris Carvajal
- Brian Callahan
- Dennis
- Dennis Korpel
- dkorpel
- Florian
- Iain Buclaw
- Martin Nowak
- MoonlightSentinel
- Razvan Nitu
- Steven Schveighoffer
- Walter Bright

Copyright © 1999-2023 by the D Language Foundation | Page generated by Ddoc on Fri Jun 2 09:00:00 2023