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

previous version: 2.097.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.098.0 comes with 3 major changes and 56 fixed Bugzilla issues. A huge thanks goes to the 41 contributors who made 2.098.0 possible.

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

Compiler changes

  1. Using the syntax (args) => {} now triggers a deprecation message

    Newcomers from languages with built-in delegates (such as JavaScript and C#) would often use (args) => { /* body */ } for delegate/function literals.

    However, in D, this syntax results in a delegate that returns a delegate, without any other side effects. This may trigger hard-to-debug bugs, therefore it is now deprecated.

    If a delegate returning a delegate is indeed the intended usage, use either (args) { return () => /* body */; } or (args) => () { /* body */ }.

  2. Improvements for the C++ header generation

    The following features/bugfixes/improvements were implemented for the experimental C++ header generator:

    • Declarations from template mixins are emitted into the instantation context
    • (Superclass) methods aliases are emitted as using ... instead of typedef ...
    • extern(D) symbols are no longer emitted by accident in certain situations
    • extern(D) structs and classes are emitted if referenced by an exported symbol
    • Forward declarations consistently include template<...>
    • extern(C++, class), extern(C++, struct) affects forward declarations
    • Renamed or local imports are emitted as using ... when possible
    • Complex types are emitted as _Complex.
    • Declarations are emitted before the first member access
    • Global variables with invalid names in C++ are omitted
    • Initializers of union variables/parameters omit non-active members
    • Typecasts are emitted as C style, not D's cast(...) ...
    • Structs are always tagged as final because D disallows struct inheritance
    • Symbol names always include template parameters and enclosing declarations when required

    Note: The header generator is still considerer experimental, so please submit any bugs encountered to the bug tracker.

Dub changes

  1. Added support for environment variables to use compilation and run(or test) option to the dub settings file and dub.json/dub.sdl.

    The following items have been added to the dub setting file: defaultEnvironments, defaultBuildEnvironments, defaultRunEnvironments, defaultPreGenerateEnvironments, defaultPostGenerateEnvironments, defaultPreBuildEnvironments, defaultPostBuildEnvironments, defaultPreRunEnvironments, defaultPostRunEnvironments. They are used when there are no project-specific settings.

        "defaultEnvironments": {
            "VAR": "Foo"

    The following items are available in each project-specific setting: environments, buildEnvironments, runEnvironments, preGenerateEnvironments, postGenerateEnvironments, preBuildEnvironments, postBuildEnvironments, preRunEnvironments, postRunEnvironments.

    In JSON

        "environments": {
            "VAR": "Foo"

    In SDL

    environments "VAR" "Foo"

List of all bug fixes and enhancements in D 2.098.0:

DMD Compiler regression fixes

  1. Bugzilla 21238: -deps considers only the first instantiation site of a template for dependencies
  2. Bugzilla 22035: [REG 2.097][ICE] Segmentation fault parsing invalid case statement

DMD Compiler bug fixes

  1. Bugzilla 16274: The curses of debugging: short argument passed in 16-bit register, against ABI
  2. Bugzilla 17041: foreach-ref can't use to static array's AliasSeq
  3. Bugzilla 21209: scope attribute inference with does not work well with foreach
  4. Bugzilla 21905: case of IFTI failure when combining ref, and alias this on a static instance
  5. Bugzilla 21928: Wrong location for "array literal in @nogc function main may cause GC allocation" error
  6. Bugzilla 21931: importC: 'alias time_t = time_t;' cannot alias itself, use a qualified name to create an overload set
  7. Bugzilla 21933: importC: struct parameters: AssertError@src/dmd/typesem.d(1890): Assertion failure
  8. Bugzilla 21934: importC: Support asm labels to specify the assembler name to use for a C symbol
  9. Bugzilla 21937: importC: Support parsing __attribute specifiers
  10. Bugzilla 21939: Duplicate error messages for wrong aggregate in 'static foreach'
  11. Bugzilla 21942: importC: Support parsing __inline__ keyword
  12. Bugzilla 21944: importC: Support parsing # line marker directive extensions
  13. Bugzilla 21945: importC AssertError@src/dmd/dsymbolsem.d(4787): Assertion failure
  14. Bugzilla 21946: importC: Support parsing __extension__ keyword
  15. Bugzilla 21948: importC: Support declaring local variables of typedef types
  16. Bugzilla 21949: noreturn doesn't follow covariance rules
  17. Bugzilla 21962: importC: Empty enums are accepted as valid code
  18. Bugzilla 21963: importC: Support declaring union types
  19. Bugzilla 21965: importC: Anonymous top-level struct or union triggers AssertError@dsymbolsem.d(4787)
  20. Bugzilla 21967: importC: Error function without 'this' cannot be 'const'
  21. Bugzilla 21968: importC: struct fields: AssertError@src/dmd/typesem.d(1890): Assertion failure
  22. Bugzilla 21970: importC: Error: variable extern symbols cannot have initializers
  23. Bugzilla 21973: importC: AssertError@src/dmd/dsymbolsem.d(4307): Assertion failure
  24. Bugzilla 21976: importC: does not distinguish between cast-expression and unary-expression correctly
  25. Bugzilla 21982: importC: Error: variable no definition of struct
  26. Bugzilla 21985: "goto" errors with unexistent label report wrong/misleading line
  27. Bugzilla 21994: (char*)"string" fails to compile
  28. Bugzilla 22005: ICE: Segmentation fault with static foreach and -betterC
  29. Bugzilla 22006: static foreach and foreach over tuple doesn't work on 16-bit
  30. Bugzilla 22007: static foreach: cannot implicitly convert expression Tuple4(0LU, 1) of type Tuple4 to int
  31. Bugzilla 22019: case 1,: allowed by grammar but not DMD
  32. Bugzilla 22028: importC: Parser accepts initializers for struct members
  33. Bugzilla 22029: importC: Parser accepts storage-class specifiers for fields
  34. Bugzilla 22030: importC: Wrong error with bad declarator
  35. Bugzilla 22032: importC: infinite loop: illegal combination of type specifiers
  36. Bugzilla 22053: catch { not rejected while in a template
  37. Bugzilla 22060: importC: Multiple forward declarations result in error struct conflicts with struct
  38. Bugzilla 22063: importC: Error: undefined identifier 'var' with pointer-to-typedef type

DMD Compiler enhancements

  1. Bugzilla 16001: Lambda syntax: forbid use with FunctionLiteralBody: (x) => {assert(x);}
  2. Bugzilla 16689: Errors in instantiated mixin templates should show instantiation point
  3. Bugzilla 18907: Support cross-compiling
  4. Bugzilla 21885: Bad diagnostic: struct is not copyable because it is annotated @disable
  5. Bugzilla 21997: CTFE should allow function pointer casts with different attributes

Phobos regression fixes

  1. Bugzilla 21920: [REG master] Error: auto can only be used as part of auto ref for template function parameters

Phobos bug fixes

  1. Bugzilla 20393: formattedRead accepts input, that should be rejected
  2. Bugzilla 21916: Error message is obfuscated when using wrong format specifier at compile-time
  3. Bugzilla 22001: Equality of std.conv.toChars() results for radix 10 depends on uninitialized bytes

Phobos enhancements

  1. Bugzilla 21926: Allow leading zeros in std.conv.octal

Druntime bug fixes

  1. Bugzilla 21550: core.memory.__delete does not actually work
  2. Bugzilla 21983: dup leaves a partially constructed array if postblit/copy ctor throws
  3. Bugzilla 22026: checkaction=context: Exception thrown by toString hides assertion failures bug fixes

  1. Bugzilla 21125: Typo in std.range.refRange documentation for opIndex
  2. Bugzilla 21906: obscure sentence in the introduction to phases of compilation
  3. Bugzilla 21935: Broken Link in Lazy Evaluation Article

Contributors to this release (41)

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

previous version: 2.097.0