Change Log: 2.072.0
Download D 2.072.0
released Oct 30, 2016
Language Changes
- Using the result of a comma expression is deprecated.
- Implicit catch statement are deprecated.
- Implicit string concatenation is deprecated.
- Restrictions of postblits and destructors in union fields have been lifted.
- Align attribute can be used with CTFEable expression.
- scope is ignored for value parameters without indirections.
Compiler Changes
Library Changes
- TypeInfo.init has been deprecated.
- New druntime switch --DRT-oncycle allows specifying what to do on cycle detection in modules.
- Wrong @trusted attributes have been removed from etc.c.curl functions curl_easy_escape, curl_escape, curl_easy_unescape, and curl_unescape.
- Implementation of MurmurHash digest.
- Process creation in std.process was sped up on Posix.
- algorithm.iteration.cumulativeFold was added.
- std.range.padLeft and std.range.padRight were added.
- std.regex.regex now supports matching multiple patterns in one go.
- std.regex.splitter now supports keeping the pattern matches in the resulting range.
- findLocalMin was added to std.numeric.
- ptr property and public constructor were added to std.experimental.ndslice.slice.Slice.
- toHash method was added to std.experimental.ndslice.slice.Slice.
- slice, shape, ndarray, and other utilities were added to std.experimental.ndslice.slice.
- as lazy tensor was added to std.experimental.ndslice.slice.
- iotaSlice lazy tensor was added to std.experimental.ndslice.selection.
- indexSlice lazy tensor was added to std.experimental.ndslice.selection.
- repeatSlice lazy tensor was added to std.experimental.ndslice.selection.
- mapSlice lazy tensor was added to std.experimental.ndslice.selection.
- partial support for Math Index Order was added to std.experimental.ndslice.slice.Slice.
- std.algorithm.mutation.swapAt was exposed
- std.range.iota's .length` property is fixed to size_t instead of the type being iterated
- std.uni.isNumber and std.uni.isPunctuation now use a separate, optimized path for ASCII inputs.
- std.uni.isAlphaNum, which is analogous to std.ascii.isAlphaNum was added.
- std.regex.regex now supports inline comments with (?#...) syntax.
- std.regex had numerous optimization applied, compile-time std.regex.ctRegex should now be generally faster then the run-time version.
- std.range.primitives.moveAt accepts only size_t for its index arguments.
- std.algorithm.sorting.isStrictlyMonotonic which doesn't allow equal values was added.
- std.file.readLink and std.file.symlink have been rangified.
- All overloads of std.conv.toImpl has been made private. Please use std.conv.to instead.
- std.algorithm.searching.{min,max}Element for ranges have been added.
- std.typecons.Ternary was added to represent three valued logic.
- Added std.math.quantize, for rounding to the nearest multiple of some number.
- Three new traits were added to std.traits.
- std.range.generate fixed to be a proper range.
- std.numeric no longer uses enforce for verifying contract preconditions.
- Final was added to std.experimental.typecons
- std.traits.isInnerClass was added to identify nested classes with an accessible outer pointer
- std.conv.emplace no longer allows to emplace classes directly nested inside other classes without specifying a suitable outer pointer
- A switch for selecting the GC implementation at runtime was added.
- A GC implementation allowing manual memory management was added.
List of all bug fixes and enhancements in D 2.072.0.
Language Changes
- Using the result of a comma expression is deprecated.
Comma expressions have proven to be a frequent source of confusion, and bugs - see here for examples.
Using the result of a comma expression will now trigger a deprecation message.
Example:
void main () { // OK, result of increment not directly used for (int i, j; i != 3; i++, j++) {...} auto r1 = getRange!int, r2 = getRange!int; // OK for (; !r1.empty && !r2.empty; r1.popFront, r2.popFront) {...} // Deprecated - the loop condition is always used for (; !r1.empty, !r2.empty; r1.popFront, r2.popFront) {...} MyContainerClass mc; // OK - expression statement, result not used if (!mc) (mc = new MyContainerClass), mc.append(new Entry); int i; // Deprecated mc = (i++, new MyContainerClass); }
- Implicit catch statement are deprecated.
Implicit catch statement are catch statement without type specified. They default to catching Throwable, which is something that should always be explicit.
Example:
int[] arr = new int[](10); // This will throw a RangeError try { arr[42]++; } catch { writeln("An error was caught and ignored"); } // The previous line is equivalent to: // catch (Throwable) { writeln("An error was caught and ignored"); }
- Implicit string concatenation is deprecated.
Implicit concatenation of string literal is a very early feature that is now supplanted by the concatenation operator ('~'), the later being more explicit.
It could result in hard to spot bug, where one missed a comma in an array expression:
void foo () { string[] arr = [ "Hello", "buggy" "World" ]; assert(arr.length == 3); // Fail, the length of the array is 2 and the content is [ "Hello", "buggyWorld" ] }
- Restrictions of postblits and destructors in union fields have been lifted.
It is now allowed to have fields with postblits (this(this)), destructors (~this()), or invariants (invariant()) in unions. Actually destructing or blitting the correct field is the duty of the programmer.
Example:
struct S { this(this) {} ~this() {} } union U { int var; S s; } unittest { U u; // won't call s.~this when u goes out of scope u = U(); // only copies the memory, use fieldwise assignment instead u.s = S(); // works like normal struct assignment destroy(u.s); // destroy currently used field }
- Align attribute can be used with CTFEable expression.
Example:
version (D_LP64) enum n = 8; else enum n = 4; align (n) struct Data { align (n == 8 ? 2 : 1): ubyte[3] buffer; int flags; } version (D_LP64) static assert(Data.flags.offsetof == 4); else static assert(Data.flags.offsetof == 3);
- scope is now ignored for value parameters without indirections.
The scope storage class is now ignored for copied value parameters that don't have any indirections.
Example:
import std.traits; void valueParam(scope int param); static assert(ParameterStorageClassTuple!valueParam[0] == ParameterStorageClass.none); void scopeParam(scope int* param); static assert(ParameterStorageClassTuple!scopeParam[0] == ParameterStorageClass.scope_);
Compiler Changes
- Native TLS on OS X 64 bit.
The compiler has been updated to use native thread local storage (TLS) on OS X when compiling for 64 bit. This means that it's possible to to link with C/C++ TLS variables. This change is an ABI breaking change and requires recompiling libraries.
The minimum required version of running the compiler and any produced binary is now Mac OS X Lion (10.7).
Xcode 7.3 has a bug causing linker errors for some TLS variables. Xcode 7.3.1 fixes this bug. Any version older than 7.3 works as well.
- Analysis for aliases in imported modules is deferred.
Example:
module lib; template ExpensiveApiImpl(int ver) { ... void func() {} pragma(msg, "instantiated ExpensiveApiImpl ", ver); } alias api1 = ExpensiveApiImpl!(1); alias api2 = ExpensiveApiImpl!(2);
import lib; void main() { // OK, prints "instantiated ExpensiveApiImpl 1" api1.func(); // Don't print "instantiated ExpensiveApiImpl 2", because // the alias name 'api2' is not used. }
- Special keyword replaced by the source file's absolute file name.
The __FILE_FULL_PATH__ special keyword is replaced by the absolute path of the current source file by the compiler.
Example:
import std.stdio; import std.path; import std.file; void main() { writeln("The main source file lives here: ", __FILE_FULL_PATH__); writeln("The contents are:"); foreach(line; File(__FILE_FULL_PATH__, "r").byLine) { writeln(line); } writeln(); writeln("Other files in the same directory are:"); foreach(entry; dirEntries(__FILE_FULL_PATH__.dirName, SpanMode.shallow)) { writefln(" - %s", entry.name); } }
- Add -verrors=spec switch.
Shows errors from speculative compiles such as:
void foo(int i) { int p; bool b = __traits(compiles, { p = &i; }); }
that are normally not shown:
(spec:1) test.d(13): Error: cannot implicitly convert expression (& i) of type int* to int
The number after spec: is the nesting of the speculative compiles.
Library Changes
- TypeInfo.init has been
deprecated.
This is a step towards removal of TypeInfo.init, which is necessary to resolve a name clash with the type property init.
Use TypeInfo.initializer instead.
- New druntime switch --DRT-oncycle allows
specifying what to do on cycle detection in modules.
When module cycles are detected, the default behavior is to print the cycle, and abort execution. However, in many cases, the cycles are not harmful. With the new --DRT-oncycle switch, you can effect a different behavior when cycles are detected:
- --DRT-oncycle=abort
- This is the default behavior, and will abort, printing the cycle to stderr when the first cycle is detected
- --DRT-oncycle=print
- Print all cycles that are detected to stderr, but do not halt execution. Order of initialization is arbitrarily chosen based on the order the modules are in the binary
- --DRT-oncycle=ignore
- Do not print anything, and do not halt execution. Order of initialization is arbitrarily chosen based on the order the modules are in the binary
extern(C) __gshared string[] rt_options = [ "oncycle=ignore" ];
($P For more information, please consult the D language specification, section Overriding Cycle Detection Abort in chapter 4 and chapter 28.7 Configuring the Garbage Collector.) - Implementation of std.digest.murmurhash.
std.digest.murmurhash has been added. MurmurHash is a non-cryptographic hash function suitable for general hash-based lookup. It is optimized for x86 architectures.
// Computing the 32-bits hash value of an int array using the convenient digest template. import std.digest.murmurhash; ubyte[4] hashed = digest!MurmurHash3_32_opt32([1, 2, 3, 4]);
- Process creation in std.process was sped up on Posix.
Previously, Posix systems would attempt to close every file descriptor from 3 to the maximum file descriptor number if inheritFDs was not specified with spawnProcess, pipeProcess, etc. std.process now uses poll() to determine which descriptors need closing.
- algorithm.iteration.cumulativeFold was added.
std.algorithm.iteration.cumulativeFold returns the successive reduced values of an input range.
assert([1, 2, 3, 4, 5].cumulativeFold!((a, b) => a + b).array == [1, 3, 6, 10, 15]); assert([1, 2, 3].cumulativeFold!((a, b) => a + b)(100).array == [101, 103, 106]);
- std.range.padLeft and std.range.padRight
were added.
std.range.padLeft and std.range.padRight are functions for padding ranges to a specified length using the given element.
import std.range; import std.algorithm.comparison; assert([1, 2, 3, 4, 5].padLeft(0, 7).equal([0, 0, 1, 2, 3, 4, 5])); assert("Hello World!".padRight('!', 15).equal("Hello World!!!!"));
- std.regex.regex now supports matching multiple patterns in one go.
import std.regex; // multi-pattern regex auto multi = regex([`\d+,\d+`,`(a-z]+):(\d+)`]); auto m = "abc:43 12,34".matchAll(multi); assert(m.front.whichPattern == 2); assert(m.front[1] == "abc"); assert(m.front[2] == "43"); m.popFront(); assert(m.front.whichPattern == 1); assert(m.front[1] == "12");
- std.regex.splitter now supports keeping the
pattern matches in the resulting range.
import std.regex; import std.algorithm.comparison : equal; auto pattern = regex(`([\.,])`); assert("2003.04.05" .splitter!(No.keepSeparators)(pattern) .equal(["2003", "04", "05"])); assert("2003.04.05" .splitter!(Yes.keepSeparators)(pattern) .equal(["2003", ".", "04", ".", "05"]));
- findLocalMin was added to std.numeric.
std.numeric.findLocalMin finds a real minimum of a real function f(x) via bracketing.
import std.numeric, std.math; auto ret = findLocalMin((double x) => (x-4)^^2, -1e7, 1e7); assert(ret.x.approxEqual(4.0)); assert(ret.y.approxEqual(0.0));
- ptr property and public constructor were added to
std.experimental.ndslice.slice.Slice.
ptr property allows to access Slice's underlaying pointer or range. Please refer to std.experimental.ndslice.slice.Slice's internal binary epresentation before using the property. ptr property is used in Mir for sparse tensors. ndslice developer mirror in Mir will be removed as soon as LDC (LLVM D compiler) supports D version 2.072.
Public constructor for Slice was added to support std.experimental.ndslice integration with other languages and libraries such as Julia language and NumPy library.
std.experimental.ndslice.slice.Slice.toHash method was added.
import std.experimental.ndslice; // hash is the same for allocated data and generated data auto a = iotaSlice(3, 7); auto b = iotaSlice(3, 7).slice; assert(a.toHash == b.toHash);
- slice, shape, ndarray, and other utilities
were added to std.experimental.ndslice.slice.
These utility functions have been added to std.experimental.ndslice:
- std.experimental.ndslice.slice.makeNdarray,
- std.experimental.ndslice.slice.makeSlice,
- std.experimental.ndslice.slice.makeUninitializedSlice,
- std.experimental.ndslice.slice.ndarray,
- std.experimental.ndslice.slice.shape,
- std.experimental.ndslice.slice.slice,
- std.experimental.ndslice.slice.uninitializedSlice.
Example: Transposing common 2D array using ndslice
import std.experimental.ndslice; auto ar = [[0, 1, 2], [3, 4, 5]]; auto sh = ar.shape; // [2, 3] type of size_t[2] auto sl = slice!int(sh); // allocates slice with corresponding shape sl[] = ar; // fills sl with values from ar ar = sl.transposed.ndarray; // allocates common 2D array assert(ar == [[0, 3], [1, 4], [2, 5]]);
std.experimental.ndslice.slice.as lazy tensor was added.
import std.experimental.ndslice; auto matrix = slice!double([2, 2], 0); auto stringMatrixView = matrix.as!string; assert(stringMatrixView == [["0", "0"], ["0", "0"]]); matrix.diagonal[] = 1; assert(stringMatrixView == [["1", "0"], ["0", "1"]]);
- iotaSlice lazy tensor was added to std.experimental.ndslice.selection.
std.experimental.ndslice.selection.iotaSlice is the fastest possible Slice.
import std.experimental.ndslice; auto sl = iotaSlice([2, 3], 10); assert(sl.transposed == [[10, 13], [11, 14], [12, 15]]);
std.experimental.ndslice.selection.indexSlice lazy tensor was added.
import std.experimental.ndslice; auto slice = indexSlice(2, 3); assert(slice == [[[0, 0], [0, 1], [0, 2]], [[1, 0], [1, 1], [1, 2]]]);
std.experimental.ndslice.selection.repeatSlice lazy tensor was added.
import std.experimental.ndslice; auto sl = iotaSlice(3).repeatSlice(4); assert(sl == [[0, 1, 2], [0, 1, 2], [0, 1, 2], [0, 1, 2]]); auto m = 4.repeatSlice(2, 3); assert(m == [[4, 4, 4], [4, 4, 4]]);
std.experimental.ndslice.selection.mapSlice lazy tensor was added.
import std.experimental.ndslice; auto s = iotaSlice(2, 3).mapSlice!(a => a * a); assert(s == [[ 0, 1, 4], [ 9, 16, 25]]);
- partial support for Math Index Order was added to std.experimental.ndslice.slice.Slice.
import std.experimental.ndslice; auto sl = iotaSlice(3, 4); assert(sl[2, 3] == 11); // D & C index order assert(sl(3, 2) == 11); // Math & Fortran index order
- std.algorithm.mutation.swapAt was exposed
std.algorithm.mutation.swapAt allows to swap elements of a RandomAccessRange by their indices.
- std.range.iota's .length property is fixed
to size_t instead of the type being iterated
std.range.iota's .length property is now always returned as size_t. This means if you are on a 32-bit CPU and you are using iota to iterate 64-bit types, the length will be truncated to size_t. In non-release mode, you will get an exception if the length exceeds size_t.max in your call to iota.
- std.algorithm.searching.{min,max}Element
have been added.
std.algorithm.searching.minElement and std.algorithm.searching.maxElement are functions to search for the minimum and maximum element in a range. They support a custom map accessor.
import std.algorithm.searching; import std.range; import std.typecons; assert([3, 1, 4].minElement == 1); assert([4, 7, 5].enumerate.maxElement!`a.value` == tuple(1, 7));
- Added std.math.quantize.
std.math.quantize rounds to the nearest multiple of some number. Features:
- The rounding method can be specified using the rfunc parameter. By default, the current rounding mode will be used, which is typically "banker's rounding".
- Overloads are included for the common case of rounding to the Nth digit place in some base.
- If known at compile time, the base and exponent (digit place) can be supplied as template parameters for better performance.
import std.math; assert(12345.6789L.quantize(20.0L) == 12340.0L); assert(12345.6789L.quantize!(10, -2) == 12345.68L); assert(12345.6789L.quantize!(10, floor)(-2) == 12345.67L);
- Three new traits were added to std.traits.
std.traits.isType, std.traits.isFunction, and std.traits.isFinal were added to std.traits.
import std.traits; static assert(isType!int); struct S {} class C {} interface I {} static assert(isType!S); static assert(isType!C); static assert(isType!I);
import std.traits; void func(){} struct S { @property int prop(){ return 0; } } static assert(isFunction!func); static assert(isFunction!(S.prop)); // is a delegate type, not function type static assert(!isFunction!(typeof(&S.prop)));
import std.traits; class C { void nf() {} final void ff() {} } final class FC {} static assert(!isFinal!(C)); static assert( isFinal!(FC)); static assert(!isFinal!(C.nf)); static assert( isFinal!(C.ff));
- std.range.generate fixed to be a proper range.
std.range.generate was set up to return a different value on each call to front. In addition, popFront did nothing. This means that manipulation functions like std.range.drop did nothing. The new version uses a one-element cache to meet the expectations of the range definition. It preserves the ref-ness of the generator as well.
- Final was added to std.experimental.typecons.
std.experimental.typecons.Final can't be mutated directly. However references are typed with their original mutability. This is equivalent to final in Java or readonly in C#.
auto a = makeFinal([1, 2, 3]); assert(a[0] == 1); // a = [2, 3]; // Reassignment is illegal, a[0] = 42; // Elements or fields are still mutable. assert(a[0] == 42);
- std.traits.isInnerClass was added to identify
nested classes with an accessible outer pointer
Classes, that are nested inside other classes (and not inside functions) and that don't define any outer symbol, have an outer field which allows to get and even set the instance of the outer class they are nested in. std.traits.isInnerClass allows to identify them. The types satisfying isInnerClass are a subset of the ones satisfying isNested, as the latter includes classes and structures nested inside functions or that redefine outer.
class Outer { class Inner1 { } class Inner2 { int outer; // redefines outer, so the Outer instance is not accessible } static class Inner3 {} // static, thus not nested } static assert(isInnerClass!(Outer.Inner1)); static assert(!isInnerClass!(Outer.Inner2)); static assert(!isInnerClass!(Outer.Inner3));
- std.conv.emplace no longer allows to emplace
classes nested directly inside other classes without specifying a suitable outer
pointer
If a class is nested within another class (there's a new trait std.traits.isInnerClass to check for this condition), emplace requires now the outer class instance as additional mandatory parameter. Before this change, emplacing did not require this parameter and access to variables of the outer class resulted in segmentation faults.
class Outer { int x; class Inner { auto getX() { return x; } } } Outer outer = new Outer(); // auto inner = buf.emplace!(Outer.Inner)(); // this is no longer allowed auto inner = buf.emplace!(Outer.Inner)(outer); // use this instead auto x = inner.getX(); // this used to cause a segmentation fault; // now it works as expected
- A runtime switch for selecting
the GC implementation was added.
This allows to select a GC at program startup.
./my_d_exe --DRT-gcopt=gc:conservative # use conservative GC (default) ./my_d_exe --DRT-gcopt=help # list available GC options
See gc_config for more information about gcopt.
In a future release it should be possible to extend the list of GCs by linking with an alternative one.
- A manual GC was added.
Use the --DRT-gc=gc:manual option to select the manual GC.
This GC is a thin wrapper around malloc and free and does not collect any garbage. It only releases memory explicity freed using GC.free. Builtin language constructs such as arrays or delegates that might allocate GC memory can leak. It supersedes the gcstub implementation.
The manual GC is useful for applications that deterministically control memory. Use dmd's -vgc switch to keep track of hidden allocations that might leak.
It can also be helpful to find memory corruptions with tools like valgrind.
List of all bug fixes and enhancements in D 2.072.0:
DMD Compiler regressions
- Bugzilla 15726: [REG2.068.0] forward reference error for circular classes, RefCounted
- Bugzilla 15861: [REG 2.069] Wrong double-to-string conversion with -O
- Bugzilla 15925: -transition=[check]imports ignores import declaration from mixin templates
- Bugzilla 15992: [REG2.072a] ICE with field variable of instantiated struct
- Bugzilla 16080: [REG2.071.0] Internal error: backend\cgobj.c 3406 when building static library
- Bugzilla 16115: [REG2.067] Wrong code with comma operator
- Bugzilla 16233: [REG2.069] ICE on wrong code
- Bugzilla 16254: [REG 2.072-devel] wrong switch skips initialization error with mixed in case labels
- Bugzilla 16292: [REG2.069] bogus Error: goto skips declaration of variable
- Bugzilla 16536: DMD master does not build on OS X 10.11.6/Xcode 7.3.1
- Bugzilla 16570: [REG 2.072.0-b1] Enum member with interpreted initializer has type of initializer not enum
DMD Compiler bugs
- Bugzilla 1357: Cannot use FFFF and FFFE in Unicode escape sequences.
- Bugzilla 5305: Cannot take pointer to intrinsic function
- Bugzilla 10225: core.simd wrong codegen for XMM.STOUPS with __simd_sto
- Bugzilla 10591: Error: only one main allowed doesn't show location of conflicting main symbols
- Bugzilla 11047: UDA + getAttributes bypass purity/safety check
- Bugzilla 11169: __traits(isAbstractClass) prematurely sets a class to be abstract
- Bugzilla 11585: ICE(cgcod.c) with SIMD and -O
- Bugzilla 12357: Untyped string variable fails silently. No compiler warning given.
- Bugzilla 12527: Cannot make @system function/delegate alias in a @safe section
- Bugzilla 12537: Templatizing opEquals results in infinite recursion in the compiler
- Bugzilla 12558: try/catch allows implicit catching of Errors without specifying any Exception type
- Bugzilla 12822: Delegate .ptr assignment considered @safe
- Bugzilla 12939: More uniform error messages for not nothrow and not @safe functions
- Bugzilla 13116: Should not be able to return ref to 'this'
- Bugzilla 13147: Wrong codegen for thisptr in naked extern (C++) methods
- Bugzilla 13536: Union of delegates breaks @safety
- Bugzilla 13537: Unions may break immutability
- Bugzilla 13674: ICE(el.c) with simd multiplication of short8
- Bugzilla 13698: ICE(e2ir.c) on on simd call
- Bugzilla 13867: Overriding a method from an extern(C++) interface requires extern(C++) on the method definition
- Bugzilla 13975: ICE: dmd crash if -gc and enum member is immutable int
- Bugzilla 14162: Erratic inference of @safe for lambdas
- Bugzilla 14450: Incorrect overloading of immutable constructor for template struct
- Bugzilla 14496: void initialization of member with indirections must not be @safe
- Bugzilla 14504: Regex Optimizer doesn't merge equivalent threads.
- Bugzilla 14532: switch block allows creating uninitialized variables
- Bugzilla 15116: Unreasonable rejection of tuple field access via named mixin
- Bugzilla 15117: Unreasonable circular reference error via named mixin
- Bugzilla 15144: Bad operand size in asm { movdqa ... } produces bogus ubyte16 initializer error elsewhere.
- Bugzilla 15191: DIP25: Taking address of ref return is not type checked soundly
- Bugzilla 15192: DIP25: Nested ref returns are type checked unsoundly
- Bugzilla 15193: DIP25 (implementation): Lifetimes of temporaries tracked incorrectly
- Bugzilla 15258: Anonymous const union members don't allow for initialization
- Bugzilla 15306: Delegates with shared context can have unshared aliasing
- Bugzilla 15326: False positive for dangling else warning
- Bugzilla 15333: Assertion failed: (!fd->vthis->csym), function FuncDeclaration_toObjFile, file glue.c, line 1034.
- Bugzilla 15372: DMD emits wrong mangling for extern(C++) free function templates
- Bugzilla 15399: unaligned pointers are not @safe
- Bugzilla 15513: Memory Corruption with thread local objects
- Bugzilla 15573: -O -inline causes wrong code with idiv instruction
- Bugzilla 15607: [ICE] CTFE internal error: bad compare on accessing default-initialized static immutable array of array
- Bugzilla 15672: Casting from void[] to T[] is erroneously considered @safe
- Bugzilla 15680: TypeInfo broken for typeof(null)
- Bugzilla 15703: @safe code should not allow certain types of array casts
- Bugzilla 15704: @safe code should not allow copying to/from void[]
- Bugzilla 15757: D main is a nested function and cannot be accessed
- Bugzilla 15760: Segfault when compiling when using __gshared and selective import.
- Bugzilla 15762: Array casts involving const enums can be made @safe
- Bugzilla 15799: Misleading error message against the contract followed by semicolon in interface
- Bugzilla 15802: (SIGSEGV) CppMangleVisitor::source_name
- Bugzilla 15816: ICE void ddmd.dclass.__assert(int) with error: anonymous classes not allowed
- Bugzilla 15835: Segfault with typeid call from lazy argument
- Bugzilla 15855: "a[{for" causes dmd to segfault
- Bugzilla 15913: cannot initialize immutable fixed size array without similar const-code
- Bugzilla 15922: DMD segfault in functionParameters()
- Bugzilla 15934: Non-virtual super class member function call ignores 'this' type qualifier
- Bugzilla 15957: Disabled postblit + template mixin break opAssign with confusing error message
- Bugzilla 15974: Spurious error: argument to mixin must be a string, not (expression()) of type string
- Bugzilla 15999: Inline assembly incorrect sign extension instead of error
- Bugzilla 16035: Compiler crashes with inout, templates, and recursion
- Bugzilla 16094: error: overlapping slice assignment (CTFE)
- Bugzilla 16095: a delegate can mutate immutable data and break shared / non-shared enforcements
- Bugzilla 16096: Linking to static library: can't parse __DATA/__objc_imageinfo
- Bugzilla 16142: Adding a dtor / postblit (even disabled) forces opAssign
- Bugzilla 16193: opApply() doesn't heap allocate closure
- Bugzilla 16195: delete should be @system
- Bugzilla 16226: -dip25 doesn't work if the return type is not explicit
- Bugzilla 16228: Insufficient diagnostics for wrong application of DIP25
- Bugzilla 16229: [Win64] Crash when generating huge symbols
- Bugzilla 16340: case where version(unittest) results in an invalid warning about a dangling else
- Bugzilla 16365: cannot allow calling function pointer from delegate in @safe code
- Bugzilla 16439: Non-typesafe variadic functions can never be @safe
- Bugzilla 16466: Alignment of reals inside structs on 32 bit OSX should be 16, not 8
- Bugzilla 16525: C++ member variables have no mangling
- Bugzilla 16530: -O -cov interaction leads to wrong codegen
- Bugzilla 16534: RefRange should define opDollar if it defines length
DMD Compiler enhancements
- Bugzilla 2659: Remove the comma operator
- Bugzilla 3657: No lexical scope for local variables in debug info
- Bugzilla 3827: Warn against and then deprecate implicit concatenation of adjacent string literals
- Bugzilla 9766: align(n) with n compile-time constant
- Bugzilla 11886: "cannot access frame" error on lambda in lambda
- Bugzilla 13242: imported aliases should be analyzed lazily
- Bugzilla 14411: switch statement: docs/behavior differ
- Bugzilla 15323: Module.members and .deferred3 should use data structure with fast lookup
- Bugzilla 16077: [CodeView] no language information in MS-COFF debug information
- Bugzilla 16394: TypeInfo.init() for static arrays returns single element instead of whole array
- Bugzilla 16409: Add support for assign-style switches
Phobos regressions
- Bugzilla 15457: Symbol Undefined __lseeki64
- Bugzilla 15918: [2.070] Results from findSplit can no longer be assigned to each other
- Bugzilla 16179: [REG2.072] git HEAD: multiSort no longer callable with delegate with context
- Bugzilla 16291: phobosinit never gets called (EncodingScheme.create fails)
- Bugzilla 16544: Add File.reopen
- Bugzilla 16580: [REG 2.072.0-b1] spawnShell segfaults on macOS
- Bugzilla 16587: split("", "x") should be []
Phobos bugs
- Bugzilla 4509: XML parser in std.xml throws TagException if the attr value is put in apostrophes.
- Bugzilla 7972: std.file.read allocate a buffer the size of the file even when given a upper limit
- Bugzilla 7989: isInputRange and isForwardRange declare unused variables
- Bugzilla 11791: std.file.write failed to write huge files
- Bugzilla 12368: std.file.write conflicts with std.stdio.write
- Bugzilla 12897: std.json.toJSON doesn't translate unicode chars(>=0x80) to "\uXXXX"
- Bugzilla 13572: etc.c.zlib must be nothrow
- Bugzilla 14136: std.uni.utfMatcher breaks @safety
- Bugzilla 14137: std.socket.getAddressInfo breaks @safety
- Bugzilla 14485: .front of empty filtered zip range is accessible
- Bugzilla 14615: std.regex.replaceFirstInto throws exception when no match is found
- Bugzilla 14966: Comparing two std.xml.Document result in infinite recursion
- Bugzilla 15341: segfault with std.signals slots
- Bugzilla 15658: isFile isn't a template
- Bugzilla 15773: D's treatment of whitespace in character classes in free-form regexes is not the same as Perl's
- Bugzilla 15791: Cannot get a stored nested struct object from Variant
- Bugzilla 15823: opIndex doesn't work for const std.variant.Variant
- Bugzilla 15827: std.variant.Variant can not be initialized with some struct
- Bugzilla 15864: chmgen triggers exception in std.regex
- Bugzilla 15865: std.file.copy(from,to) deletes the file if from and to specify the same file
- Bugzilla 15872: [ndslice] indexing a slice with an array causes an error inside ndslice
- Bugzilla 15874: getSymbolsByUDA fails if struct has no UDAs
- Bugzilla 15884: Assigning char[] to std.json.JSONValue creates array, not string
- Bugzilla 15885: float serialized to JSON loses precision
- Bugzilla 15917: std.concurrency module destructor causes useless creation of new MessageBox
- Bugzilla 15919: [ndslice] Undetected spell miss in selection.reshape()
- Bugzilla 15920: std.traits.MemberFunctionsTuple gives a wrong result
- Bugzilla 15960: SetUnion should filter duplicates
- Bugzilla 15963: Hidden unresolved forward reference issue in std.uni
- Bugzilla 15964: The template constraints for std.uni.sicmp are too permissive
- Bugzilla 15973: nextPow2 and truncPow2 rely on processor specific behavior
- Bugzilla 15980: std.traits.Identity is undocumented but public
- Bugzilla 16010: [ndslice] byElement throw assert error
- Bugzilla 16026: std.math.frexp!float() wrong for very small subnormal values
- Bugzilla 16036: std.net.isemail - isEmail reurns "valid: false" for any email with EmailStatusCode.none (default)
- Bugzilla 16046: ScopedAllocator does not set prev, causing segfaults
- Bugzilla 16054: can break immutable with std.typecons.Rebindable
- Bugzilla 16070: std.meta.{ApplyLeft,ApplyRight} fail with mixed type/value arguments
- Bugzilla 16072: std.container.binaryheap should be extendable for arrays
- Bugzilla 16090: popFront generates out-of-bounds array index on corrupted utf-8 strings
- Bugzilla 16192: std.conv.toChars() opSlice wrong for radix other than 10
- Bugzilla 16219: std.experimental.allocator.makeArray does unnecessary allocations for ranges with length
- Bugzilla 16238: std.string.lastIndexOf fails compilation with -de
- Bugzilla 16241: std.xml mistakenly disallows "==" in comments but allows "--"
- Bugzilla 16331: std.container.array constructor shouldn't check result of emplacement
- Bugzilla 16351: Nonstandard output library causes no-argument writeln() to fail.
- Bugzilla 16372: Broken links in documentation
- Bugzilla 16383: Algebraic visit does not match handlers to const classes
- Bugzilla 16385: std.range: undefined behaviour when skipping over 0xff in string.popFront
- Bugzilla 16386: std.concurrency: destructors called twice on objects passed as Message
- Bugzilla 16387: getSymbolsByUDA works with structs but fails with classes
- Bugzilla 16413: multiSort doesn't work with @system comparison function
- Bugzilla 16420: Incorrect example in std.getopt docs
- Bugzilla 16501: packed ndslices does not compile
- Bugzilla 16503: [ndslice] prevents fastmath LDC attribute
- Bugzilla 16506: segfaults in std.experimental.allocator: FreeTree with GCAllocator or Mallocator
- Bugzilla 16507: std.experimental.allocator: FreeTree clears too eagerly
Phobos enhancements
- Bugzilla 2104: std.regex: escape function for regular expressions
- Bugzilla 7551: Regex parsing bug for right bracket in character class
- Bugzilla 10777: std.algorithm.multiSort to return a std.range.SortedRange
- Bugzilla 11229: std.string.toLower is slow
- Bugzilla 12227: Allow matching multiple patterns in one go with std.regex
- Bugzilla 12367: std.regex: Recognize (?# ... ) comment syntax
- Bugzilla 12379: Add toFile function which writes its first argument to a file
- Bugzilla 13409: std.range.padLeft/Right
- Bugzilla 13422: std.ascii has isAlphaNum but std.uni doesn't
- Bugzilla 13796: A simple "array head const" struct for Phobos
- Bugzilla 15229: BigInt(Range of chars) too
- Bugzilla 15797: Add Option to Not Drop Matches in std.regex.splitter
- Bugzilla 15800: std.conv.to!int does not work with ranges of any char type
- Bugzilla 15803: std.file should support sub-second file time precision on POSIX
- Bugzilla 15860: lockstep should support foreach_reverse
- Bugzilla 15991: std.datetime.StopWatch is not @nogc
- Bugzilla 15995: std.conv.text and friends can be made faster with std.array.appender
- Bugzilla 16308: [ndslice] should always has save primitive
- Bugzilla 16311: toHash for Slice is not defined
- Bugzilla 16315: [] ?= operations does not work with packed slices [ndslice]
- Bugzilla 16319: std.experimental.allocator.make subtly wrong with nested classes
- Bugzilla 16363: Cannot construct a random access range using frontTransversal
- Bugzilla 16364: getUDAs and hasUDA do not give consistent results
- Bugzilla 16443: std.getopt: segmentation fault with empty string option
Druntime regressions
- Bugzilla 1180: the GC failes to handle large allocation requests propperly
- Bugzilla 16211: [REG 2.058] Cyclic dependencies broken again
Druntime bugs
- Bugzilla 6333: The 'capacity' function is not pure/nothrow/@safe.
- Bugzilla 14601: pthread functions aren't marked @nogc
- Bugzilla 15111: hashOf fails for structs that have an alias this to a dynamic array
- Bugzilla 15838: Many Win32 API callback functions miss extern(Windows)
- Bugzilla 15958: Missing extern(Windows) of core.sys.windows functions
- Bugzilla 15959: core.sys.windows modules should be modified for x64
- Bugzilla 15976: explicite TLS initializes badly in DLLs if other threads exist
- Bugzilla 15987: core.sys.windows.msacm remains pseudo definitions
- Bugzilla 15997: Wrong constant value for ERROR_WINHTTP_CLIENT_AUTH_CERT_NEEDED in winhttp
- Bugzilla 16007: Some Win32 API structs has wrong definitions
- Bugzilla 16049: core.sys.windows structs have wrong sizes and aligns
- Bugzilla 16594: module destructors called again if an exception got thrown earlier
Druntime enhancements
- Bugzilla 14117: core.atomic should be @safe
dlang.org bugs
- Bugzilla 15442: Eponymous template restrictions should be documented
- Bugzilla 16004: Document changes to protection attributes
- Bugzilla 16016: Remove std.concurrencybase from the docs
- Bugzilla 16040: Remove Dconf announcement
- Bugzilla 16114: [ddox] "Improve this page" links broken for package.d modules
- Bugzilla 16167: chm-nav.json generation is broken
- Bugzilla 16186: [Programming in D for C Programmers] Backticks should be escaped in explanation of raw string syntax
- Bugzilla 16231: Language specification: rename std.regexp -> std.regex
dlang.org enhancements
- Bugzilla 16141: Organizations page unreachable
- Bugzilla 16152: dpl-docs/ddox doesn't show documentation for eponymous template member
- Bugzilla 16464: opCast doco is insufficient
Installer bugs
- Bugzilla 16349: better curl retry for install.sh script