D语言 struct constrcutor 的 bug
今天有空测试了一下 D语言 2.0 最新增加的 struct constructor 特性,结果刚来就发现一个大 bug:
import std.stdio;
struct Foo
{
int x;
int y;
}
void main()
{
Foo f3 = 123;
}
上面这个程序居然能在 DMD 2.019 的编译器上编译通过,真是不可思议。
今天有空测试了一下 D语言 2.0 最新增加的 struct constructor 特性,结果刚来就发现一个大 bug:
import std.stdio;
struct Foo
{
int x;
int y;
}
void main()
{
Foo f3 = 123;
}
上面这个程序居然能在 DMD 2.019 的编译器上编译通过,真是不可思议。
评论功能维护中,当前仅展示历史评论。
Wow, this is amazing.