Change Log: 2.099.1
Download D 2.099.1
released Apr 07, 2022
Compiler changes
List of all bug fixes and enhancements in D 2.099.1.
Compiler changes
- 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
- 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
- Bugzilla 17434: [REG: 2.073] import lookup ignores public import.
- Bugzilla 20015: [REG 2.086] Deprecated -preview, -revert, and -transition options not documented
- Bugzilla 20717: Unsilenced bogus "undefined identifier" error from speculative collision
- Bugzilla 21285: Delegate covariance broken between 2.092 and 2.094 (git master).
- Bugzilla 22175: assert fail when struct assignment value is desired and struct size is odd
- Bugzilla 22639: Copy constructors with default arguments not getting called
- Bugzilla 22858: [REG2.099] Incorrect alignment of void*[0]
- Bugzilla 22859: Error: forward reference of variable isAssignable for mutually recursed allSatisfy
- Bugzilla 22860: Error: unknown with mutually recursive and nested SumType
- Bugzilla 22863: [REG2.099] -main doesn't work anymore when used for linking only (without source modules)
- Bugzilla 22969: Can't mixin name of manifest constant on right-hand side of alias declaration
DMD Compiler bug fixes
- Bugzilla 22852: importC: Lexer allows invalid wysiwyg and hex strings
- Bugzilla 22853: importC: Lexer allows nesting block comments
- Bugzilla 22868: __traits(parameters) returns parameters of delegate instead of function
- Bugzilla 22871: Using an alias to __traits(parameters) causes unknown error
- Bugzilla 22939: bad error message: Error: no property msg for type string
- Bugzilla 22942: Invalid section type / offset for newer XCode versions
- Bugzilla 22993: Missing quotes in octal literal hint
Druntime regression fixes
- Bugzilla 20778: exception messages with nulls within are treated inconsistently
Druntime enhancements
- Bugzilla 22908: OpenBSD: Add getpwnam_shadow and getpwuid_shadow function prototypes
dlang.org bug fixes
- 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