Under the "Const Attribute" section, the spec contains code like the following: class C { const int a; const int b; this() { a = 3; b = 2; } this(int x) { this(); // ok, forwarding constructor } } However, this code does not compile, producing errors: asdf.d(11): constructor asdf.C.this missing initializer for const field a asdf.d(11): constructor asdf.C.this missing initializer for const field b It seems to me that there's no particular reason why this shouldn't work, so I'm tagging this as "rejects-valid" as well as "spec".
789 is a duplicate of this bug, but as it's the one that's been marked fixed I'll mark this as the duplicate. *** This bug has been marked as a duplicate of 789 ***
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル