struct S { string g() { return ""; } void f() { mixin(g()); } } Making g() static stops DMD from crashing.
There's another problem. This fails to compile: struct S { static string g() { return null; } void f() { mixin(g()); } //line 4 } z.d(4): Error: argument to mixin must be a string, not (null) (Tested with dmd v2.041.)
PATCH(against 2.042): This is trivial. // interpret.c line 2569: if (pthis && fd) { // Member function call if (pthis->op == TOKthis) - pthis = istate->localThis; + pthis = istate ? istate->localThis : NULL; else if (pthis->op == TOKcomma) pthis = pthis->interpret(istate); The second issue is that mixin(null); is never allowed. It's completely unrelated to this bug. Create a new bug for it if you think it matters.
changeset 424
Fixed DMD1.048 and 2.043.
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル