Found by stunaep who posted to D.learn: http://forum.dlang.org/post/tbaooqjjjsvgnlchjadc@forum.dlang.org Following code works with 2.070.2, but with git head dmd (ec7c6a9) it throws "core.exception.InvalidMemoryOperationError@src/core/exception.d(693): Invalid memory operation". ---- import std.container.array: Array; void main() { new Array!int([1]); } ----
Issue 15809 looks very similar. This suggests that there's a dmd/druntime bug beneath.
Why are people on D.learn using the development version of the compiler? *** This issue has been marked as a duplicate of issue 15822 ***