This doesn't work:
const int[4][4] a = [[10,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]];
int[4][4] b = a.dup;

Error: cannot implicitly convert expression (_adDupT(& D15TypeInfo_xG4G4i6__initZ,cast(const(int[4u])[])a)) of type int[4u][] to int[]

And with dynamic arrays:
Error: cannot implicitly convert expression (_adDupT(& D13TypeInfo_xAAi6__initZ,a)) of type const(int)[][] to int[][]


This does:
const int[4] c = [10,0,0,0];
int[4] d = c.dup;

Shouldn't dup do the former as well and if not how should it be done?

Reply via email to