https://issues.dlang.org/show_bug.cgi?id=6958
--- Comment #2 from [email protected] --- Adding another testcase, because the error message is different from the original testcase: ``` void func(int x, ref int delegate() dg) { int inner() { return x; } dg = &inner; } int check() { int delegate() dg; func(5, dg); return dg(); } pragma(msg, check()); ``` With DMD 2.094.2: <source>(3): Error: variable `x` cannot be read at compile time <source>(10): called from here: `dg()` <source>(12): called from here: `check()` <source>(12): while evaluating `pragma(msg, check())` --
