Test case: -------------------------------- static assert({ if (0 in [0:0]) {} return true; }()); -------------------------------- x.d(4): Error: cannot evaluate delegate pure nothrow bool() { if (0 in [0:0]) { } return true; } () at compile time x.d(1): Error: static assert (delegate pure nothrow bool() { if (0 in [0:0]) { } return true; } ()) is not evaluatable at compile time -------------------------------- Calling 'if((a in b) !is null)' can workaround the problem.
The problem is there isn't an IndexExp::isBool.
https://github.com/D-Programming-Language/dmd/commit/0904c8aa200e4d080d500d96d5904c33ba17cc86 https://github.com/D-Programming-Language/dmd/commit/e48a8c67f02172c72e04f36759d2d6868d716368
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル