struct foo { int a = 4; } static foo f = {a:void,}; // Void initializer allowed in struct initializer. writefln(f.a); // prints 0 // Struct initializer can have any number of leading and trailing commas, whereas only a trailing one is allowed. static foo f = {,,,,a:1,,,,}; // Compiler hangs if this is at the end of a file. static foo f = {
(In reply to comment #0) > struct foo { int a = 4; } > > static foo f = {a:void,}; // Void initializer allowed in struct initializer. > writefln(f.a); // prints 0 This isn't a bug. > > // Struct initializer can have any number of leading and trailing commas, > whereas only a trailing one is allowed. > static foo f = {,,,,a:1,,,,}; Fixed in 2.055 and 1.070. > > // Compiler hangs if this is at the end of a file. > static foo f = { Fixed in 1.023.
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル