This program, compiled with dmd 2.042: int foo() { int[int] aa = [1: 1]; int r = aa.get(1, 1000); return 1; } enum _ = foo(); void main() {} Generates the errors: ...\dmd\src\druntime\import\object.di(366): Error: Cannot interpret key in *cast(int[int]*)&this.p at compile time test.d(5): Error: cannot evaluate aa.get(1,delegate int() { return 1000; } ) at compile time test.d(8): Error: cannot evaluate foo() at compile time test.d(8): Error: cannot evaluate foo() at compile time
This is D2-only.
https://github.com/D-Programming-Language/dmd/commit/61ea0ca9cc8a0220830318bc1b66f0788db65818 https://github.com/D-Programming-Language/dmd/commit/c9bdc18bd85a0b2b5f3b2dc741b45c739e611c5a