https://issues.dlang.org/show_bug.cgi?id=13488
--- Comment #5 from Kenji Hara <[email protected]> --- (In reply to Sobirari Muhomori from comment #4) > Doesn't work: > --- > struct B > { > const(int)[] a; > } > > immutable(B) b(immutable int[] a) pure > { > return B(a); > } > --- > Error: cannot implicitly convert expression (B(cast(const(int)[])a)) of type > B to immutable(B) It's equivalent with: struct B { const(int)[] a; } void main() { immutable int[] a; immutable(B) b = B(a); // <-- B is not implicitly convertible to immutable(B) } --
