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

previous version: 2.110.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, 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.111.0 comes with 4 major changes and 129 fixed Bugzilla issues. A huge thanks goes to the 80 contributors who made 2.111.0 possible.

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

Compiler changes

  1. Copying from const(void)[] to void[] is disallowed with -preview=fixImmutableConv

    If const(void)[] data contains tail const pointers, copying to void[] can subsequently violate const data:

    void f(int*[] a, const int*[] b)
    {
        void[] va = a;
        const void[] vb = b;
        va[] = vb[]; // fills `a` with pointers to const
        *a[0] = 0; // const data mutated
    }
    

    Copying vb data to va is no longer allowed with the -preview=fixImmutableConv switch.

  2. Import expressions are now treated as hex strings

    While Import expressions are typed as string, they are also used to embed binary files. By treating them the same as hex strings, they will implicitly convert to arrays of integral types other than char.

    // Formerly, a cast was required:
    immutable ubyte[] iconImg = cast(immutable ubyte[]) import("icon.png");
    
    // Now, it implicitly converts to integral arrays:
    immutable ubyte[] iconImg = import("icon.png");
    
  3. New trait isCOMClass to detect if a type is a COM class

    A COM class inherits from a possibly user defined interface called IUnknown. To detect this during compilation use the trait __traits(isCOMClass, Type). Or for during runtime use the TypeInfo_Class flag.

  4. bool values other than 0 or 1 are not @safe

    The spec was updated (for 2.109) so that only 0 and 1 are safe values for bool. This means that reading a bool value whose underlying byte representation has other bits set is implementation-defined and should be avoided. Consequently the following are deprecated in @safe code:

    • void initialization of booleans (since 2.109)
    • Reading a bool field from a union (since 2.109)
    • Runtime casting a dynamic array to a bool dynamic array type
    • Runtime casting a bool dynamic array to a tail mutable dynamic array type
    • Casting a pointer to a bool pointer type
    • Casting a bool pointer to a tail mutable pointer type


List of all bug fixes and enhancements in D 2.111.0:

DMD Compiler regression fixes

  1. Bugzilla 10713: [REG2.063] ICE with typeof(this.nonExistingField) in method signature
  2. Bugzilla 20562: [dmd] Memory allocation failed (ERROR: This is a compiler bug)
  3. Bugzilla 20686: failed static assert using a combination of __traits and unfinished type
  4. Bugzilla 20730: [REG 2.091] __traits(compiles) fails if any ungagged errors occurred in compilation

DMD Compiler bug fixes

  1. Bugzilla 4101: [tdpl] DMD doesn't give error when goto skips initialization
  2. Bugzilla 4174: Template interface functions not allowed, making operator overloads difficult
  3. Bugzilla 9662: Implement RDMD test suite
  4. Bugzilla 10257: .tupleof loses protection information upon iteration
  5. Bugzilla 10370: ICE on invalid imports when module is used as package
  6. Bugzilla 10386: Package import feature breaks with static libraries
  7. Bugzilla 10574: "auto ref" fails to match when IFTI succeeds (strip to level const)
  8. Bugzilla 10587: __traits(getAttributes) doesn't work on incomplete templated types
  9. Bugzilla 10603: Refused pure attribute on the left for function pointer argument
  10. Bugzilla 10639: Win64: wrong optimizer codegen with struct literal with complex fields
  11. Bugzilla 10699: override inconsistently allowed for abstract functions
  12. Bugzilla 16643: CTFE internal error with null
  13. Bugzilla 17503: is-expression pattern in static if matches too many types
  14. Bugzilla 20587: _rt_loadLibrary symbol not found
  15. Bugzilla 20603: 'cannot use non-constant CTFE pointer in an initializer' in recursive structure with overlap
  16. Bugzilla 20610: const in a .tupleof loop is ignored
  17. Bugzilla 20621: Since DMD 2.087.0: 32 Bit Linux now uses XMM registers: SIGILL, Illegal instruction on intel Pentium III
  18. Bugzilla 20688: Wrong code when linking to C complex number functions
  19. Bugzilla 20691: Converting scope static array to scope dynamic array should be error
  20. Bugzilla 20812: _d_assocarrayliteralTX segfault assigning a shared associative array an AA literal
  21. Bugzilla 20831: __traits(getAttributes) failes to compile when used on a parameter with no name
  22. Bugzilla 20912: Compiler incorrectly lists non-matching overloads as matching in diagnostic
  23. Bugzilla 21020: named import in with block masks local symbol
  24. Bugzilla 21995: Struct with size uint.max or greater causes ICE
  25. Bugzilla 23131: With -vasm all the X87 instructions are printed wrong.
  26. Bugzilla 23294: [dip1000] parameter to parameter assignment leads to incorrect scope inference
  27. Bugzilla 23830: Azure failure for OMF: Module name not printed before struct symbol
  28. Bugzilla 23841: isZeroInit does not take into account unions
  29. Bugzilla 24153: Inliner breaks -betterC by requiring TypeInfo
  30. Bugzilla 24375: ImportC: .di generator outputs C expression with -> operator
  31. Bugzilla 24447: ImportC: extern symbols cannot have initializers
  32. Bugzilla 24651: Bitfield layout wrong for 48-bit field on 32-bit Linux
  33. Bugzilla 24663: dip1000 doesn't check slice expression implicitly converted to static array
  34. Bugzilla 24669: ImportC: C files are not compiled with '-i' flag
  35. Bugzilla 24670: importC: .di generation does not place parentheses around const struct return types
  36. Bugzilla 24694: [DIP1000] can escape stack pointer through struct.class.field
  37. Bugzilla 24701: No error produced from casted noreturn variable
  38. Bugzilla 24705: Arguments of synchronized method are unintentionally treated as shared with -preview=nosharedaccess
  39. Bugzilla 24706: Missing errors for first operand of comma expression
  40. Bugzilla 24707: error message has bad parameter attribute order
  41. Bugzilla 24733: ImportC: #pragma pack(pop) restores wrong alignment
  42. Bugzilla 24748: DMD can't output object files with fully qualified name, making -od overwirte each other file
  43. Bugzilla 24762: @nogc false positive error
  44. Bugzilla 24776: Struct with anonymous union has wrong isZeroInit
  45. Bugzilla 24803: __traits(location) is inconsistent with modules
  46. Bugzilla 24807: Error message missing parens for template instance
  47. Bugzilla 24819: Optimizer changes result of float calculations on 32-bit
  48. Bugzilla 24822: When passing a non-POD argument to an rvalue parameter, an unnecessary blit is done
  49. Bugzilla 24830: separate compilation + circular deps + templated opCmp = missing symbols
  50. Bugzilla 24836: struct return by hidden struct arg does not need copy to become an rvalue
  51. Bugzilla 24845: Compiler error when trying to assign to an AA value of an enum instance
  52. Bugzilla 24848: bad parser diagnostic for a partial MulExp
  53. Bugzilla 24855: VRP fails to prevent overflow after division
  54. Bugzilla 24861: Vestige of 16 bit code being accidentally generated
  55. Bugzilla 24871: DDoc strips indent in triple slash comments
  56. Bugzilla 24883: Speculative template overload error escapes with -preview=rvaluerefparam
  57. Bugzilla 24891: Two scope attributes emitted as part of .di generation

DMD Compiler enhancements

  1. Bugzilla 9811: Add static code analyzing (i.e. PVS-Studio-like diagnostic)
  2. Bugzilla 9997: Missed misspell suggestions for UFCS
  3. Bugzilla 10023: Add rtInfo (or equivalent) to ModuleInfo
  4. Bugzilla 18235: Group logically similar tests into the same module in the D2 testsuite
  5. Bugzilla 20516: [D 2.0 FAQ]
  6. Bugzilla 20614: CTFE supports typeid(stuff).name but not classinfo.name
  7. Bugzilla 20888: std.range.Cycle does not compose with const
  8. Bugzilla 20960: -profile=gc does not track class objects allocated with new
  9. Bugzilla 20982: Add a pragma to suppress deprecation messages
  10. Bugzilla 21564: Allow assignment syntax for instantiating mixin templates
  11. Bugzilla 23449: spellchecker should suggest corrections for pointer members
  12. Bugzilla 23812: ImportC: allow adding function attributes to imported C functions
  13. Bugzilla 24639: ImportC: defines of negative constants not detected for enum conversion
  14. Bugzilla 24645: Hidden static assert error messages if more than 20 errors
  15. Bugzilla 24738: Import core.interpolation suggestion
  16. Bugzilla 24745: Better error message when creating an associative array with the wrong syntax
  17. Bugzilla 24749: A clause consisting only of "throw" should be the unlikely path

Phobos bug fixes

  1. Bugzilla 64: Unhandled errors should go to stderr
  2. Bugzilla 10581: Undefined identifier "std.uni.isWhite" when passing string lambda to std.algorithm.filter
  3. Bugzilla 10607: DirEntry has no constructor
  4. Bugzilla 10647: AutoImplement should implement overridden member functions with 'override' attributes
  5. Bugzilla 10680: BigInt uses deprecated std.traits.unsigned
  6. Bugzilla 14138: std.parallelism.task breaks @safety
  7. Bugzilla 15315: can break immutable with std.algorithm.move
  8. Bugzilla 20870: std.outbuffer.printf is trusted
  9. Bugzilla 20872: std.array.assocArray trusts user-provided 'front' for values
  10. Bugzilla 20929: std.experimental.allocator.expandArray's range-based overload fails to instantiate for char and wchar arrays.
  11. Bugzilla 23300: std.array : array wrongly propagates scopeness of source
  12. Bugzilla 24667: goo.gl is going away
  13. Bugzilla 24685: std.stdio.File.rawRead allows reading raw pointers from files in @safe code
  14. Bugzilla 24704: The error message for DateTime.fromISOExtString says that valid ISO extended strings that it does not support are invalid ISO extended strings
  15. Bugzilla 24715: std/process: Default to libc closefrom in spawnProcessPosix
  16. Bugzilla 24773: Stable sort() invokes the destructor on uninitialized elements
  17. Bugzilla 24801: RefRange doesn’t work if range primitives are not const
  18. Bugzilla 24809: In some cases, stable sort assigns to unininitialized elements
  19. Bugzilla 24818: Tag of a single-type SumType wastes space

Phobos enhancements

  1. Bugzilla 10538: std.typecons.wrap should consider opDispatch
  2. Bugzilla 17214: std.array.Appender has an unnecessary indirection
  3. Bugzilla 17479: Public constructor for std.process.Pid
  4. Bugzilla 20330: json toString with outputrange
  5. Bugzilla 20889: Support construction of std.bigint.BigInt from a sign and a byte-array magnitude
  6. Bugzilla 21045: std.getopt: Support blank as separator of multiple values
  7. Bugzilla 22293: Nullable should define opCast!bool
  8. Bugzilla 24524: Very slow process fork if RLIMIT_NOFILE is too high
  9. Bugzilla 24698: Appender needs to expose readonly property 'size_t length' without using 'data' property
  10. Bugzilla 24823: std.json: Allow optionally preserving the order of fields in JSON objects
  11. Bugzilla 24851: Some members of CustomFloat can have const this
  12. Bugzilla 24875: std.traits.isAggregateType does not consider enums of aggregate types to be aggregate types

Druntime bug fixes

  1. Bugzilla 10380: [AA] Wrong code using associative array as key type in associative array
  2. Bugzilla 20763: checkaction=context does not format pointers
  3. Bugzilla 24660: atomic_wchar_t has wrong size on Posix
  4. Bugzilla 24661: wctype_t and wctrans_t are platform-dependent
  5. Bugzilla 24835: hasElaborateAssign is true for structs where opAssign is disabled if a member variable has elaborate assignment
  6. Bugzilla 24864: hasElaborateDestructor incorrectly true for structs with anonymous unions

Druntime enhancements

  1. Bugzilla 17416: SocketOption.REUSEPORT not available on linux
  2. Bugzilla 19369: core.sys.posix.setjmp lacks support for Darwin
  3. Bugzilla 20567: GC should not start threads for parallel marking in simple programs

dlang.org bug fixes

  1. Bugzilla 10565: Level-5 titles are missing in Language reference
  2. Bugzilla 10605: Lambda grammar is not sufficient
  3. Bugzilla 14945: unions are missing from the ABI page
  4. Bugzilla 20601: [Oh No! Page Not Found]
  5. Bugzilla 24680: [dip1000] final auto class method infers scope but no return
  6. Bugzilla 24732: FAQ article is out of date on calling printf

dlang.org enhancements

  1. Bugzilla 19348: Struct casts should be better documented.
  2. Bugzilla 24659: Memory safe D page lacks information on return ref
  3. Bugzilla 24868: Undocumented cast from struct to static array
  4. Bugzilla 24876: Undocumented cast from slice to static array
  5. Bugzilla 24890: spec/arrays.dd should mention comparison and warn about dangling .ptr

Contributors to this release (80)

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

previous version: 2.110.0