import std.stdio; struct S { int x, y; this(int x, int y) { this.x = x; this.y = y; } } class A { const S s = {1, 2}; } void main() { A a = new A; writeln(a.s); }
C:\d\projects\test>dmd main Error: struct S has constructors, cannot use { initializers }, use S( initializers ) instead
エラーの行番号が出ないのと,エラーメッセージの出力先が標準エラー出力ではなく標準出力になっているのはバグだろう.