Resize a dynamic array by setting the .length property
Newly created elements are initialized to their default value.
Has two variants:
- _d_arraysetlengthT for arrays with elements that initialize to 0
- _d_arraysetlengthiT for non-zero initializers retrieved from TypeInfo
voidmain()
{
int[] a = [1, 2];
a.length = 3; // gets lowered to `_d_arraysetlengthT(typeid(int[]), 3, &a)`
}
Resize a dynamic array by setting the .length property
Newly created elements are initialized to their default value.
Has two variants: - _d_arraysetlengthT for arrays with elements that initialize to 0 - _d_arraysetlengthiT for non-zero initializers retrieved from TypeInfo