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

previous version: 2.061 – next version: 2.063

Download D 2.062
released Feb 18, 2013

Language Changes

  1. typeof() change:
  2. As a result of fixing Bugzilla 6408, the usage of typeof() and indexing may require changes to user code:

    template ElementTypeOf(T)
        alias typeof(T[0]) ElementTypeOf;
    void main()
        // worked in 2.061 due to a bug
        static assert(is(ElementTypeOf!(int[]) == int));

    The expression in typeof(T[0]) used to be wrongly interpreted as the element type of T, however in v2.062 it is interpreted as a static array of element T with length 0. To work around this the user can either use a trait from the standard library, or use the .init property of a type for arbitrary expressions:

    import std.range;
    template ElementTypeOf(T)
        // use T.init
        alias typeof(T.init[0]) ElementTypeOf;
    void main()
        // use std.range.ElementType
        static assert(is(ElementType!(int[]) == int));
        // use custom template after fixing its code
        static assert(is(ElementTypeOf!(int[]) == int));
  3. alias syntax change:
  4. The newly introduced "alias foo = int" syntax is not usable with subtyping. This is to prevent confusion from a possible future syntax which would enable aliasing of super constructors. For now, the existing alias syntax can be used:

    struct S
        int x;
        // alias this = x;  // error
        alias x this;

    In the upcoming release (v2.063) a new syntax will be introduced:

    struct S
        int x;
        alias this : x;  // new feature in upcoming 2.063

List of all bug fixes and enhancements:

DMD Compiler regressions

  1. Bugzilla 9174: regression(2.057) ice(cast.c) with ternary operator and alias this
  2. Bugzilla 9244: union containing pointers not allowed
  3. Bugzilla 9258: opAssign with base class triggers "identity assignment operator overload" error
  4. Bugzilla 9259: Passing an array of pointers to a typesafe vararg is broken
  5. Bugzilla 9263: statement is not reachable when statement is reachable
  6. Bugzilla 9266: Cannot define two Tuple objects.
  7. Bugzilla 9268: [ice-on-invalid] void assignment in fail44.d no longer caught in frontend
  8. Bugzilla 9273: DMD segfaults with templated ctors in implicit super call
  9. Bugzilla 9276: regression(2.061): Forward reference error
  10. Bugzilla 9278: ICE todt.c:692 when float containing struct is defined after use
  11. Bugzilla 9309: Regression (2.061): -O -release generates wrong code
  12. Bugzilla 9332: [REG][2.060 -> 02.061] struct constructor taking itself creates 'Warning: statement is not reachable'
  13. Bugzilla 9377: Link-failure regression cause by fixing issue 8504
  14. Bugzilla 9385: [Regression 2.057] null literal should be implicitly convertible to bool
  15. Bugzilla 9387: Compiler switch -O changes behavior of correct code
  16. Bugzilla 9399: ICE with nested function, template alias parameter, -inline, depending on order of source files
  17. Bugzilla 9404: Nullable is unusable with 2.061
  18. Bugzilla 9406: (Regression: 2.061) Stack overflow from a forward reference error
  19. Bugzilla 9409: [2.062-alpha] Regression with $ inside of expression tuples
  20. Bugzilla 9410: [Regression 2.061] Wrong selection for function overload
  21. Bugzilla 9416: [REG][2.060 -> 02.061] DMD eagerly instantiates template parameter-less opAssign
  22. Bugzilla 9420: [2.062alpha] Weird "(null)" output in error message
  23. Bugzilla 9435: regression(head): forward reference error
  24. Bugzilla 9436: enum cannot be forward referenced with cyclic imports and mixin
  25. Bugzilla 9496: [REG 2.061 -> 2.062 alpha] "this[1 .. $]" passes wrong "this" to "opDollar"
  26. Bugzilla 9514: "template instance … is not an alias"
  27. Bugzilla 9525: [CTFE] Cannot convert &S to const(S*) at compile time

DMD Compiler bugs

  1. Bugzilla 1369: Unable to find 'this' in __traits(getMember)
  2. Bugzilla 1730: Bogus error message calling a non-const struct method on a const struct reference
  3. Bugzilla 1841: Closure detection doesn't work when variable is used in a nested function
  4. Bugzilla 2452: Unimplemented method errors should show function overload
  5. Bugzilla 3321: debug flags
  6. Bugzilla 3466: Wrong JSON output for templated classes, structs, and interfaces
  7. Bugzilla 4178: destructor missing in JSON output
  8. Bugzilla 4269: Regression(2.031): invalid type accepted if evaluated while errors are gagged
  9. Bugzilla 4477: JSON output for function definitions includes insufficient type information
  10. Bugzilla 4478: JSON output omits import statements
  11. Bugzilla 4540: Better error message for wrong switch type
  12. Bugzilla 5168: String enums don't work with -g compiler switch
  13. Bugzilla 5461: Invalid declaration for auto functions in .di files generated by DMD -H
  14. Bugzilla 5933: Cannot retrieve the return type of an auto-return member function
  15. Bugzilla 5978: ICE(mtype.c) when calling __traits(parent) on the child of an anonymous function.
  16. Bugzilla 6057: Problem with defining enum in function
  17. Bugzilla 6319: debug's relaxed purity does not apply to nested scopes
  18. Bugzilla 6332: Auto-return function cannot be inferred as @safe
  19. Bugzilla 6408: string[].init gives a wrong type
  20. Bugzilla 6538: ICE(mangle.c) Invalid template constraints
  21. Bugzilla 6552: Wrong fallthrough warning for CaseRange
  22. Bugzilla 6652: foreach parameter with number range is always ref
  23. Bugzilla 6708: immutable ref implicit cast to const ref
  24. Bugzilla 6743: ICE(mars.c) attempting to compile an exe file
  25. Bugzilla 6833: Floating point literals lose fractional part in headers
  26. Bugzilla 6873: Multiple storage class is not allowed on template argument
  27. Bugzilla 6902: Different "pure nothrow int()" types
  28. Bugzilla 6905: ref acts as auto ref when return type is missing
  29. Bugzilla 6962: Wrong Code With Scope Exit and Array Parameter, only with -O
  30. Bugzilla 6963: pure/nothrow inference doesn't work for function pointers
  31. Bugzilla 7152: Can't assign null to default argument
  32. Bugzilla 7159: Forward reference when casting auto return method
  33. Bugzilla 7252: ICE(template.c): 'global.errors' on line 4893 in file 'template.c'
  34. Bugzilla 7408: traits compiles fails for built-in properties of template instances
  35. Bugzilla 7420: Duplicate "cannot be read at compile time" error messages
  36. Bugzilla 7585: functions in templates inferred as delegate
  37. Bugzilla 7740: unicodeProperties cannot be read at compile time for ctRegex
  38. Bugzilla 7950: Type tuples are incorrectly flattened in base type list of interface
  39. Bugzilla 8053: Recursive alias this causes infinite loop
  40. Bugzilla 8152: Linking C library causes Seg-fault
  41. Bugzilla 8153: Warning about toHash signature is incorrect on x86_64
  42. Bugzilla 8504: Template attribute inferrence doesn't work
  43. Bugzilla 8583: [64 bit] AA ushort[dchar] byValue range is corrupted on x86_64
  44. Bugzilla 8631: illegal overrides accepted
  45. Bugzilla 8717: private and protected restrict member usage in same module
  46. Bugzilla 8741: wrong code for struct member initialized using struct constructor
  47. Bugzilla 8742: Anonymous nested class derived from another nested class makes DMD crash
  48. Bugzilla 8763: struct initialization with empty variadic arguments tries to call constructor
  49. Bugzilla 8783: ref foreach update of const fixed size arrays in constructor
  50. Bugzilla 8787: Virtual not abstract methods in interfaces error message
  51. Bugzilla 8832: Segfault when accessing range returned by function that has delegate referencing local variables
  52. Bugzilla 8847: voldemort + inout confuses "is"
  53. Bugzilla 8892: Wrong diagnostic for static array assignment
  54. Bugzilla 8898: false positive dangling else warning
  55. Bugzilla 8913: Wrong code in IfStatement condition Expression
  56. Bugzilla 8922: __traits(parent, <imported package>) shows current module as a parent
  57. Bugzilla 8969: is(T == __parameters) is undocumented
  58. Bugzilla 8982: ICE(ctfeexpr.c) __parameters of an erroneous default parameter
  59. Bugzilla 9018: __traits(compiles, ...) is true on second check for same incompilable code
  60. Bugzilla 9083: mixin expression on template argument doesn't work
  61. Bugzilla 9113: ICE(interpret.c): CTFE assignment to member of struct in union
  62. Bugzilla 9178: UDA: getAttributes does not play well with tupleof
  63. Bugzilla 9191: Unhelpful error message on failing override
  64. Bugzilla 9195: Should not be able to index a pointer in safed
  65. Bugzilla 9198: Vararg functions don't respect IFTI rules
  66. Bugzilla 9200: Wrong SIMD code generated
  67. Bugzilla 9208: [ICE](func.c line 1205) with auto return in recursive function
  68. Bugzilla 9236: CTFE ice on switch + with(EnumType)
  69. Bugzilla 9250: Wrong line number for error involving length of a static array
  70. Bugzilla 9254: ICE on invalid foreach aggregate
  71. Bugzilla 9264: [64bit] Wrong code with conversion from int parameter to float
  72. Bugzilla 9284: DMD segfaults with templated ctors in constructor delegation
  73. Bugzilla 9291: [ICE][REG] throwing undefined identifier with nothrow crashes dmd
  74. Bugzilla 9293: enum struct with StructInitializer reports weird error
  75. Bugzilla 9304: Unary minus operator doesn't work correctly with SIMD types.
  76. Bugzilla 9305: Ugly Ddoc for default template lambda expressions
  77. Bugzilla 9312: with statement error message is wrong
  78. Bugzilla 9315: ICE (expression.c:4249, StructLiteralExp::getField) Tupleof of nested struct literal
  79. Bugzilla 9320: optimizer should do copy propagation on structs, too
  80. Bugzilla 9322: Internal error: ../ztc/cod1.c 3510 with SIMD on OSX 32
  81. Bugzilla 9330: Cannot run dmd test suite with MSYS
  82. Bugzilla 9338: Compiler segfaults if try to CTFE member function without valid 'this'
  83. Bugzilla 9348: "tmpl!arg" syntax followed by "!is" or "!in"
  84. Bugzilla 9350: std.algorithm.findAdjacent unreachable code warning with infinite ranges
  85. Bugzilla 9357: Floating-point literal should always be printed with a period in diagnostic errors
  86. Bugzilla 9358: Compiler creates duplicate switch cases after an error
  87. Bugzilla 9368: Final switch on typedef'ed enum is not properly checked
  88. Bugzilla 9369: DDoc hardcodes '&' -> '&amp;' in code
  89. Bugzilla 9374: 'super' should be accessible inside template constraint
  90. Bugzilla 9398: Wrong diagnostic for ternary operator type mismatch
  91. Bugzilla 9418: Segmentation fault using only datetime and stdio.
  92. Bugzilla 9438: Strange RefCounted stack overflow
  93. Bugzilla 9442: typeid() doesn't work without this. for class fields
  94. Bugzilla 9453: ice(symbol.c) with slice on temporary
  95. Bugzilla 9458: ModExp generates invalid code against array operands
  96. Bugzilla 9461: Ability to break typesystem with inout
  97. Bugzilla 9479: _error_ in error message of type inference of a delegate literal
  98. Bugzilla 9484: Syntax error in JSON output
  99. Bugzilla 9510: core.bitop.bsr undefined

DMD Compiler enhancements

  1. Bugzilla 2630: ddoc should be able to document unittests
  2. Bugzilla 3404: JSON output should retain original alias names
  3. Bugzilla 4194: Attributes included in JSON output
  4. Bugzilla 5529: std.system.endian for pure functions?
  5. Bugzilla 5893: Allow simple aliases for operator overloading
  6. Bugzilla 6171: rdmd: cache dependency file to improve startup time [patch]
  7. Bugzilla 8105: Implement "in ref"
  8. Bugzilla 8128: unittest blocks should be allowed in interfaces
  9. Bugzilla 9389: ignore -Hd if -Hf is present
  10. Bugzilla 9463: make @safe "non-escapable"

Phobos regressions

  1. Bugzilla 9355: [security] SSL certificate signature verification disabled in
  2. Bugzilla 9444: Regression (2.059): shell doesn't throw on error.
  3. Bugzilla 9457: isSorted(string) doesn't work
  4. Bugzilla 9523: will no longer convert enums to themselves

Phobos bugs

  1. Bugzilla 5065: writefln("%f" of a Tuple prints a result
  2. Bugzilla 5265: std.array.back does not work correctly for wchar-based arrays
  3. Bugzilla 5726: boyerMooreFinder hangs when finding
  4. Bugzilla 5763: traits.d BaseClassesTuple function incorrectly handles Object class argument
  5. Bugzilla 5773: sort() and topN() fail on sliced/resized array of tuples
  6. Bugzilla 6066: std.container: BinaryHeap interface is broken.
  7. Bugzilla 6436: Refcounted initialization bug
  8. Bugzilla 6635: std.conv.emplace: enforcement is too weak
  9. Bugzilla 6668: Wrong "to" conversion stack trace
  10. Bugzilla 7142: Wrong formatted write of boolean values
  11. Bugzilla 7659: std.stdio.File.close() erases
  12. Bugzilla 7819: std.file.setTimes throws error on folders
  13. Bugzilla 8078: receiveOnly should tell which type it expected and got on mismatch
  14. Bugzilla 8314: randomSample primes with constant
  15. Bugzilla 8326: std.string.format results in run-time exception
  16. Bugzilla 8367: std.range.chain's template constraint is inadequate
  17. Bugzilla 8368: std.algorithm.sort's template constraint is inadequate
  18. Bugzilla 8567: isDynamicArrray!S == true for S with alias this to array
  19. Bugzilla 8689: Variant opArithmetic does not attempt float conversion
  20. Bugzilla 8694: std.zlib.(Un)Compress can cause an _onInvalidMemoryOperationError
  21. Bugzilla 8837: BigInt needs better operator template constraints
  22. Bugzilla 8890: std.algorithm.commonPrefix does not handle unicode correctly
  23. Bugzilla 8920: iota should work with all integral types
  24. Bugzilla 9005: std.concurrency.spawn should allow void delegate(Args) shared for new Tid
  25. Bugzilla 9163: std.parallelism broken with extensive optimizations (gdc)
  26. Bugzilla 9211: regex lookahead, (?=(\d\d\d)+\b) failed
  27. Bugzilla 9288: Parameter(Identifier|DefaultValue)Tuple report pointless errors
  28. Bugzilla 9299: std.algorithm.minPos of const(int)[]
  29. Bugzilla 9317: ParameterStorageClassTuple reports errors for inout function
  30. Bugzilla 9336: Writeln is unable to print address of shared variable

Phobos enhancements

  1. Bugzilla 4287: opOpAssign!("~=") for std.array.Appender
  2. Bugzilla 4813: trait for getting at access modifiers
  3. Bugzilla 5666: std.array.replace compile error (string and immutable string)
  4. Bugzilla 6614: std.traits should have an isFinal template
  5. Bugzilla 7896: Sequence slicing
  6. Bugzilla 8143: Safe enum conversion
  7. Bugzilla 9337: There's no Duration.max
  8. Bugzilla 9339: std.random.uniform!Enum should return random enum member

Druntime bugs

  1. Bugzilla 4793: Runtime.loadLibrary cannot load dll using MBS paths.
  2. Bugzilla 5375: Detection of cyclic module imports provides error findings on console, instead of exception msg
  3. Bugzilla 8132: LPTSTR always aliases to LPSTR
  4. Bugzilla 9373: Add deprecation message to all empty deprecation statements

Website regressions

  1. Bugzilla 9467: Operator Overloading anchors are broken
  2. Bugzilla 9492: [2.052 beta] Stylesheet not found for off-line HTML docs

Website bugs

  1. Bugzilla 5513: Erroneous example in std.algorithm
  2. Bugzilla 7304: Online docs incorrect with regards to covariant arrays
  3. Bugzilla 7345: interfaceToC.html missing on left-hand side
  4. Bugzilla 8302: Documentation of dirEntries in std.file is incomplete
  5. Bugzilla 8574: [std.format] The flag ' ' works for floating numbers, not only for integers
  6. Bugzilla 8619: Tuples article uses writefln instead of writeln
  7. Bugzilla 9321: Dead link to HTML5 standard in language specification
  8. Bugzilla 9394: ABI for static arrays is outdated
  9. Bugzilla 9446: ".keys" missing from properties table at
  10. Bugzilla 9503: [grammar] template declaration/instance must take one or more arguments?

Website enhancements

  1. Bugzilla 9302: Document extern properly
previous version: 2.061 – next version: 2.063