1
我需要有多种类型的JSON,所以我用Typedef
如下:创建于Vibe.data.json.Json使用新的typedef类型,隐式转换错误
alias NewType = Typedef!(Json);
我使用Vibe.d的Json版本我使用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]
我阅读文档,并没有发现任何限制使用Typedef
。