bool foo(string s) { enum int[string] aa = ["aa":1, "bb":2]; return cast(bool)(s in aa); } enum bool r = foo("xx"); void main() {} dmd 2.042 gives: test.d(3): Error: Cannot interpret s in (["aa":1,"bb":2]) at compile time test.d(5): Error: cannot evaluate foo("xx") at compile time test.d(5): Error: cannot evaluate foo("xx") at compile time I have tagged this as major bug because it limits a lot the uses of AAs in CTFE. And AA.get too is not available yet at compile-time. I presume this is caused by the pointers that are not available yet at compile-time.
https://github.com/D-Programming-Language/dmd/commit/19f4e10de21ecf7284227d54b3690d961d2e7e89
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル