Try this on both linux and windows with dmd 2.031 give me a segment fault because of a null pointer reference. struct Foo { } void foo (Foo b, void delegate ()) { } void main () { foo(Foo(1), (){}); }
Bug #3227 and bug #3228 are probably duplicates of this one.
Original title: "Bad struct declaration before a anonymous delegate within the parameter list show a segment fault" It's actually a lot more general than that. And it's a regression. Another example from bug #3227: auto x = (void){}; ---- ice.d(1): Error: cannot have parameter of type void ice.d(1): Error: cannot have parameter of type void <segfault> Other examples from bug #3228: void main(){ (){}; (){}; } ice.d(1): Error: function has no effect in expression (__dgliteral1) <segfault> This smiley variant should compile without errors. But it just segfaults. --- static assert(!is(typeof((){(){} ;-() {};})));
*** Issue 3227 has been marked as a duplicate of this issue. ***
*** Issue 3228 has been marked as a duplicate of this issue. ***
Fixed dmd 1.047 and 2.032
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル