I needed to have multiple types of Json so I used Typedef
as following:
alias NewType = Typedef!(Json);
I am using Vibe.d Json version, I get the following message when compiling using DMD64 D Compiler v2.072.0
:
Error: cannot implicitly convert expression ([cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u]) of type ubyte[] to void[32]
I read the documentation and did not find any limitations for using Typedef
.
It is an error in
Typedef
it seems it is not able to alias a type which use array of typevoid
, Same problem exist withJSONValue
from std_data_json. In this case I change this line: https://github.com/s-ludwig/taggedalgebraic/blob/master/source/taggedalgebraic.d#L58 toubyte
type and it is working now. I will try look at it further and fix it.Issue link