On 03/18/2017 01:22 PM, Oleg B wrote:
enum arr = cast(ubyte[])[0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,4];
auto arr1 = cast(void[])arr;
immutable arr2 = cast(immutable(void)[])arr;
enum arr3 = cast(void[])arr;
Aside: The casts here do nothing to affect the outcome.
On 19/03/2017 1:22 AM, Oleg B wrote:
Hello. I found strange behavior while casting enum array and immutable
array.
import std.stdio;
void main()
{
enum arr = cast(ubyte[])[0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,4];
auto arr1 = cast(void[])arr;
immutable arr2 = cast(immutable(void)[])arr;
Hello. I found strange behavior while casting enum array and
immutable array.
import std.stdio;
void main()
{
enum arr = cast(ubyte[])[0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,4];
auto arr1 = cast(void[])arr;
immutable arr2 = cast(immutable(void)[])arr;
enum arr3 = cast(void[])arr;