Bug 14463 – [REG2.067] DMD crashes compiling module level immutable struct that takes an array in ctor
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-04-19T13:16:00Z
Last change time
2015-04-26T00:04:46Z
Keywords
CTFE, ice, pull
Assigned to
nobody
Creator
dzugaru
Comments
Comment #0 by dzugaru — 2015-04-19T13:16:30Z
DMD on Windows v2.067 (seems to work on dpaste (presumably 2.065 there))
module main;
struct Boo
{
private int[1] c;
this(int[] x)
{
c = x;
}
}
immutable Boo a = Boo([1]);
Works without "immutable", works if declaration of "a" is moved below module level, works with constructor accepting plain value.