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

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,, 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 and running the pending_changelog target:
    make -f posix.mak pending_changelog

2.091.0 comes with 9 major changes and 29 fixed Bugzilla issues. A huge thanks goes to the 38 contributors who made 2.091.0 possible.

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

Compiler changes

  1. The keyword body is now deprecated

    The keyword body, used when a function / method has contract, has now been deprecated, and do should be used instead. Using do in place of body has been supported since 2.075.0, after DIP1003 was accepted. At the same time, body was made a contextual keyword, but kept being non-deprecated due to its prevalence. According to the deprecation process, body will be removed from the language in release 2.101.0 at the earliest.

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

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

  4. Can now extract delegate from lazy parameter

    The underlying delegate of the lazy parameter may be extracted using the & operator:

    void test(lazy int dg)
        int delegate() dg_ = &dg;
        assert(dg_() == 7);
        assert(dg == dg_());
    void main()
        int a = 7;

    Previously this caused a compile error.

Runtime changes

  1. Expanded bindings in

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

  2. Added core.stdcpp.memory.unique_ptr

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

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

DMD Compiler bugs

  1. Bugzilla 9937: CTFE floats don't overflow correctly
  2. Bugzilla 18147: Debug information limited in size
  3. Bugzilla 19515: POSIX,C++: Template argument pack wrongly mangled
  4. Bugzilla 20474: Deprecation warnings inside deprecated function template
  5. Bugzilla 20507: Debug statements affect inference of templated functions attributes

Phobos regressions

  1. Bugzilla 7006: std.math.pow (integral, integral) crashes on negative exponents
  2. Bugzilla 19738: std.range.choose assignment breaks @safe-ty

Phobos bugs

  1. Bugzilla 5232: [patch] & 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 12461: Typedef and opOpAssign
  5. Bugzilla 15891: Compiler error when std.algorithm.cache after 2 layers of
  6. Bugzilla 17427: std.concurrency internal errors on uninitialised mailbox
  7. Bugzilla 20259: [Function Socket.bind] Doesn't inform what Exception it throws
  8. Bugzilla 20493: Incorrect result of BigInt * BigInt
  9. Bugzilla 20495: std.range.choose range is not safe when calling save

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

Druntime regressions

  1. Bugzilla 20447: [REG 2.089] importing core.thread exposes unistd, hiding object.dup

Druntime bugs

  1. Bugzilla 19489: Null function call results in no stack trace
  2. Bugzilla 19909: core.stdc.errno missing POSIX error code on Windows
  3. Bugzilla 20459: Runtime arg parsing should stop at '--'
  4. Bugzilla 20468: emplace doesn't forward constructor arguments' (l/r)valueness
  5. Bugzilla 20476: chainTogether leaks exception with -dip1008
  6. Bugzilla 20497: thread with limited stackspace crashes depending on size of TLS
  7. Bugzilla 20512: Return type of memchr should be inout(void)* rather than void*
  8. Bugzilla 20513: Return type of wmemchr should be inout(wchar_t)* rather than wchar_t* bugs

  1. Bugzilla 19325: The 'body' keyword is still not deprecated

Contributors to this release (38)

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

previous version: 2.090.0