在Vibe.data.json.json上使用Typedef创建新类型,隐式转换错误
我需要有多种类型的Json,所以我使用了在Vibe.data.json.json上使用Typedef创建新类型,隐式转换错误,d,dmd,vibed,D,Dmd,Vibed,我需要有多种类型的Json,所以我使用了Typedef,如下所示: alias NewType = Typedef!(Json); 我使用的是Vibe.d Json版本,当使用DMD64 d编译器v2.072.0进行编译时,我收到以下消息: Error: cannot implicitly convert expression ([cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(ubyte)0u, cast(u
Typedef
,如下所示:
alias NewType = Typedef!(Json);
我使用的是Vibe.d Json版本,当使用DMD64 d编译器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]
我阅读了文档,没有发现使用
Typedef
的任何限制。这是Typedef
中的一个错误。似乎无法对使用类型数组void
的类型进行别名,来自std\u data\u json>的JSONValue
也存在同样的问题。在本例中,我将这一行更改为:ubytetype,它现在正在工作。我将尝试进一步检查并修复它