【发布时间】:2016-12-27 14:05:18
【问题描述】:
我需要有多种类型的 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 的任何限制。
【问题讨论】: