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.078.0 (upcoming)

previous version: 2.077.0

Download D nightlies
To be released


List of all upcoming bug fixes and enhancements.

Compiler changes

  1. fix Issue 16997 - Integral promotion rules not being followed for unary + - ~ operators

    To follow the C integral promotion rules, types are promoted to int before the unary + - or ~ operators are applied. Existing D does not do this.

    This is corrected when one of the following command line switches are used:

    -transition=intpromote -transition=16997

    It affects operands of type byte, ubyte, short, ushort, char, and wchar. The operands are promoted to int before the operator is applied. The result type will now be int.

    The values computed will be different for some values of the operands:

    * All values of - and ~ applied to ubyte, ushort, char, and dchar operands will change.

    * The values of -byte(-128) and -short(-32768) will change.

    If one of the '-transition=' switches is not specified, and warnings are turned on, a warning will be emitted for these operations. To turn off the warning and work as desired with or without the '-transition=' switch:

    Option 1:

    Rewrite op b as op int(b) to use correct, i.e. C-like, behavior.

    Option 2:

    Rewrite op b as typeof(b)(op int(b)) to preserve the old behavior.

    Eventually, the warning will become a deprecation, then an error, and then the C-like behavior will become the default.

Library changes

  1. std.container.dlist supports linearRemoveElement

    linearRemoveElement removes the first occurence of an element from the dlist

    import std.container : Dlist;
    import std.algorithm.comparison : equal;
    
    auto a = DList!int(-1, 1, 2, 1, 3, 4);
    a.linearRemoveElement(1);
    assert(equal(a[], [-1, 2, 1, 3, 4]));
    
  2. std.container.slist supports linearRemoveElement

    linearRemoveElement removes the first occurence of an element from the slist

    import std.container : Slist;
    import std.algorithm.comparison : equal;
    
    auto a = SList!int(-1, 1, 2, 1, 3, 4);
    a.linearRemoveElement(1);
    assert(equal(a[], [-1, 2, 1, 3, 4]));
    
  3. Deprecate save for std.range.package.Transposed

    Transposed is incorrectly marked as a forward range. Its popFront primitive cannot be used without affecting any other copies made with save. save will be removed from Transposed in November 2018.

    https://issues.dlang.org/show_bug.cgi?id=17952

    auto x = [[1,2,3],[4,5,6]].transposed;
    auto y = x.save;
    y.popFront;
    assert(x.equal([[1,4],[2,5],[3,6]])); // FAILS, x is really [[2,5],[3,6]]
    
  4. std.typecons.Ternary.opBinary supports bool operands

    Now std.range.Ternary can be used in bitwise operations with bool

    import std.typecons : Ternary;
    
    Ternary a = Ternary(true);
    assert(a == Ternary.yes);
    assert((a & false) == Ternary.no);
    assert((a | false) == Ternary.yes);
    assert((a ^ true) == Ternary.no);
    assert((a ^ false) == Ternary.yes);
    

List of all bug fixes and enhancements in D 2.078.0 (upcoming):

DMD Compiler regressions

  1. Bugzilla 17246: [REG2.053] Extra destructor call.
  2. Bugzilla 17915: [REG 2.073] core.exception.AssertError@ddmd/optimize.d(614): Assertion failure
  3. Bugzilla 17955: compiler segfault in DsymbolSemanticVisitor::visit(UnittestDeclaration*)

DMD Compiler bugs

  1. Bugzilla 5332: Undefined reference to zero length array
  2. Bugzilla 16649: Header gen skips parens
  3. Bugzilla 16997: Integral promotion rules not being followed for unary + - ~ expressions
  4. Bugzilla 17842: [scope] array append allows for escaping references
  5. Bugzilla 17853: Switch statement without braces only works with one case
  6. Bugzilla 17900: FreeBSD 10.3 runnable/cpp_abi_tests.d(94): Assertion failure (test suite)
  7. Bugzilla 17908: Can't alias an overload set with disabled function
  8. Bugzilla 17927: [scope] scope inout parameter value can be escaped via return
  9. Bugzilla 17940: bool function parameters loaded from struct sometimes miscompiled with -O
  10. Bugzilla 17944: MSCOFF: debug info not compatible with LLVMs LLD
  11. Bugzilla 17947: C++ std::pair::swap mangled incorrectly

DMD Compiler enhancements

  1. Bugzilla 17256: Inconsistent output between json and ddoc
  2. Bugzilla 17878: Add __traits(isFuture, ...)

Phobos bugs

  1. Bugzilla 2447: There's no disconnectall for std.signals
  2. Bugzilla 6895: std.traits.isCovariantWith doesn't work for function, function pointer and delegate
  3. Bugzilla 10395: [std.stdio] Closing a popened File with unread output throws an exception
  4. Bugzilla 16542: makeArray not usable with const initializer
  5. Bugzilla 17730: [scope][dip1000] std.algorithm.move escapes scope variable in @safe code
  6. Bugzilla 17901: FreeBSD 10.3: AssertError@std/experimental/allocator/building_blocks/region.d(652)

Phobos enhancements

  1. Bugzilla 1998: std.bitarray should have setAll / opSliceAssign(bool) etc
  2. Bugzilla 4717: std.bitmanip.BitArray changes
  3. Bugzilla 4763: std.stdio.File.open() : more efficient implementation
  4. Bugzilla 6244: Add powmod / modpow function to std.math
  5. Bugzilla 9362: Add a method to remove one item to std.container.SList
  6. Bugzilla 13532: std.regex performance (enums; regex vs ctRegex)
  7. Bugzilla 17905: byCodeUnit should allow access to underlying range
  8. Bugzilla 17952: std.range.transposed save is invalid

Druntime bugs

  1. Bugzilla 17851: htonl already defined in phobos64.lib

Tools bugs

  1. Bugzilla 7997: Optlink issues 'Index Range' error with static zero length array
previous version: 2.077.0