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.091.0

previous version: 2.090.1

Download D nightlies
To be released


This changelog has been automatically generated from all commits in master since the last release.

  • The full-text messages are assembled from the changelog/ directories of the respective repositories: dmd, druntime, phobos, tools, dlang.org, installer, and dub.
  • See the DLang-Bot documentation for details on referencing Bugzilla. The DAutoTest PR preview doesn't include the Bugzilla changelog.
  • The pending changelog can be generated locally by setting up dlang.org and running the pending_changelog target:
    make -f posix.mak pending_changelog


2.091.0 comes with 16 major changes and 55 fixed Bugzilla issues. A huge thanks goes to the 54 contributors who made 2.091.0 possible.

List of all upcoming bug fixes and enhancements in D 2.091.0.

Compiler changes

  1. D1-style operator now have a lower priority than D2-style

    D1 operator overloads have been deprecated in . They historically had priority over D2 operator overload, and that priority was kept as is even after deprecating them.

    One main difference between D1 and D2 operator overload is that D1's are virtual by default, while the D2 operator overloading scheme relies on template, and so cannot be virtual. Code relying on virtuality of operator can be trivially adapted by providing a D2-style operator overload that forwards to a virtual method.

    However, as D1 operator overloads take priority, the deprecation message will be issued even if a D2 operator overload is present. This means that code relying on virtual operators would need not only to introduce the aforementioned D2-style overload, but also to rename their method not to match the reserved D1 names. This in turns forces libraries to introduce a breaking change in order to silence the deprecation.

    Starting from this release, D2-style operator overloads take priority over D1-style, making it trivial to forward the former to the later.

  2. Class deallocator have been removed from the language

    Class deallocator have been deprecated in v2.080.0 (see ), and turned into an error in v2.087.0. They have now been completely removed from the language, and the parser won't recognize them anymore.

  3. Can now report line numbers in GNU error style

    DMD now supports reporting errors and warnings in GNU error style, that is, filename:line[:column]: message. This may ease compatibility with existing IDEs.

    Enable this style by calling DMD with -verror-style=gnu.

Runtime changes

  1. Added missing pthread_attr_destroy in some place.

    Added missing pthread_attr_destroy, this prevents memory leak in some OSes such as freebsd or solaris.

  2. Expanded bindings in core.sys.windows.security

    Many enum members were missing, the list is now reasonably up-to-date.

  3. Added core.stdcpp.memory.unique_ptr

    Added core.stdcpp.memory.unique_ptr, which corresponds to C++ std::unique_ptr.

  4. Added TFD_TIMER_CANCEL_ON_SET.

    Added TFD_TIMER_CANCEL_ON_SET option, which marks a timer as cancelable if the realtime clock is used.

Library changes

  1. std.bigint is now @safe

    Many BigInt operations used to be @system because of assembly routines and casts from mutable to immutable data. These parts are now marked @trusted, so that BigInt can now be used in @safe code.

  2. Replaced approxEqual by isClose in std.math.

    The template approxEqual for comparing floating point numbers has been replaced by the template isClose, which has better default values and is symmetric in its arguments.

    To (almost) keep the current behaviour of approxEqual(a, b) use isClose(a, b, 1e-2, 1e-2), but we recommend to adjust the code to make it work with isClose(a, b).

    In one of the next releases approxEqual will be deprecated and eventually removed.

  3. Removed deprecated std.format.Mangle.

    The deprecated enum Mangle containing mangled names of basic types has been removed. Use std.demangle.demangle instead to parse mangled names.

  4. Removed deprecated structs ByLine, ByChunk, ByRecord from std.stdio.

    The deprecated structs ByLine, ByChunk, ByRecord have been removed from std.stdio. Use the functions byLine, byChunk, byRecord instead.

  5. Removed deprecated functions from std.string

    The deprecated functions inPattern, countchars, removechars, squeeze and munch in std.string have been removed. Any code that still needs them can use UndeaD instead.

  6. std.algorithm.sorting.schwartzSort supports binary transform functions too

    The transform template parameter of std.algorithm.sorting.schwartzSort isn't restricted to unary functions taking an element anymore, but can also be a binary function taking an element and its index in the original range.

    The original index can therefore be used when computing the transformed value to sort by.

  7. Added curry to std.functional

    Converts a function of multiple parameters to a function of 1 parameter that returns a function of 1 parameter... until it runs out of parameters and evaluates the function. Essentially: f(x, y, z) == curry(f)(x)(y)(z)

Dub changes

  1. Environment variable SOURCE_FILES added

    New environment variable $SOURCE_FILES added containing source files from build settings.

  2. DUB now has zsh completion

    A zsh completion script is now present in scripts/zsh-completion/_zsh. It can be installed under the user's prefered fpath and provides completion for options for the most common dub commands, as well as list of packages (based on local packages), e.g. for dub add.


List of all bug fixes and enhancements in D 2.091.0:

DMD Compiler regressions

  1. Bugzilla 10100: Identifiers with double underscores and allMembers
  2. Bugzilla 15812: static struct inside extern(C++) class cannot be used as key to associative array
  3. Bugzilla 16709: [Reg 2.068] Error: common.to at common.d conflicts with common.to at common.d
  4. Bugzilla 17098: Takes hours to -O compile then fails with Internal error: backend/cgreg.c 405
  5. Bugzilla 17145: [REG2.066.0] Tuple expansion error in local enum declaration

DMD Compiler bugs

  1. Bugzilla 9937: CTFE floats don't overflow correctly
  2. Bugzilla 17257: Wrong recursive template destructor reflection
  3. Bugzilla 18147: Debug information limited in size
  4. Bugzilla 19479: Garbage .init in string mixins in static foreach in mixin templates
  5. Bugzilla 19515: POSIX,C++: Template argument pack wrongly mangled
  6. Bugzilla 20362: dmd fails to infer scope parameter for delegate
  7. Bugzilla 20375: std.typecons.RefCounted does not work with checkaction-context
  8. Bugzilla 20421: Exceptions don't work when linking through lld-link
  9. Bugzilla 20474: Deprecation warnings inside deprecated function template
  10. Bugzilla 20507: Debug statements affect inference of templated functions attributes
  11. Bugzilla 20514: obj-c info incorrectly placed in __objc_const section
  12. Bugzilla 20538: malformed enum definition compiles
  13. Bugzilla 20545: Segfault/Assertion failure when parsing invalid AA literal
  14. Bugzilla 20547: Wrong error message when trying to "new" an associative array
  15. Bugzilla 20551: In @safe code and using delegates, it's possible to escape references to function frame

DMD Compiler enhancements

  1. Bugzilla 20569: [DIP1000] allow taking the address of a scope struct field if it has no indirections

Phobos regressions

  1. Bugzilla 7006: std.math.pow (integral, integral) crashes on negative exponents

Phobos bugs

  1. Bugzilla 5232: [patch] std.conv.to & std.conv.roundTo report invalid overflows for very large numbers
  2. Bugzilla 5628: std.math unittest disabled - roundoff error in pow() on SSE2
  3. Bugzilla 7446: [TDPL] Trivial asynchronous file copy example crashes with OwnerTerminated
  4. Bugzilla 8388: std.traits.MemberFunctionsTuple doesn't work with constructors or destructors
  5. Bugzilla 12461: Typedef and opOpAssign
  6. Bugzilla 15891: Compiler error when std.algorithm.cache after 2 layers of std.algorithm.map
  7. Bugzilla 17427: std.concurrency internal errors on uninitialised mailbox
  8. Bugzilla 20232: WhiteHole is unusable with @safe interface functions
  9. Bugzilla 20259: [Function Socket.bind] Doesn't inform what Exception it throws
  10. Bugzilla 20493: Incorrect result of BigInt * BigInt
  11. Bugzilla 20521: Checking for and getting empty variables on Wine / XP fails
  12. Bugzilla 20540: (White|Black)Hole does not work with return|scope functions
  13. Bugzilla 20542: std.math.nextafter(NaN, y) and nextafter(x, NaN) should return NaN
  14. Bugzilla 20544: socket.remoteAddress throws out of memory error with unix domain socket peer

Phobos enhancements

  1. Bugzilla 20146: Allow casting from std.bigint.BigInt to built-in floating point types
  2. Bugzilla 20480: make std.getopt ready for DIP 1000
  3. Bugzilla 20548: Use bit vector instead of bool[] in RandomCover when choices cannot be packed in a single word
  4. Bugzilla 20566: std.sformat should avoid allocating memory when printing floating point values

Druntime bugs

  1. Bugzilla 15322: version(Unicode) should affect only default aliases
  2. Bugzilla 16658: Win32API: default IE ver. set to 4.0 is too old
  3. Bugzilla 19489: Null function call results in no stack trace
  4. Bugzilla 19909: core.stdc.errno missing POSIX error code on Windows
  5. Bugzilla 20459: Runtime arg parsing should stop at '--'
  6. Bugzilla 20468: emplace doesn't forward constructor arguments' (l/r)valueness
  7. Bugzilla 20476: chainTogether leaks exception with -dip1008
  8. Bugzilla 20512: Return type of memchr should be inout(void)* rather than void*
  9. Bugzilla 20513: Return type of wmemchr should be inout(wchar_t)* rather than wchar_t*

Druntime enhancements

  1. Bugzilla 19218: object.destroy should check for classes for static arrays
  2. Bugzilla 20550: Use fixed seeds for treaps in GC
  3. Bugzilla 20567: GC should not start threads for parallel marking in simple programs
  4. Bugzilla 20577: Add missing symbols related to Windows UAC

dlang.org bugs

  1. Bugzilla 20500: running examples on the home page only displays '1 unittests passed'

Installer enhancements

  1. Bugzilla 20489: Installer deleting files after install

Contributors to this release (54)

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

previous version: 2.090.1