https://issues.dlang.org/show_bug.cgi?id=16301
--- Comment #9 from Eyal <e...@weka.io> --- In the code review I saw that the PR changed the CTFE to use dynamic scoping lookup instead of lexical scoping so after much IRC back and forth I eventually managed to distill the problematic example to: @safe: unittest { struct Foo { @safe: int i; int whoami() { return i; } int call(int delegate() @safe dlg) { return dlg(); } } int func() { auto foo1 = Foo(1); auto foo2 = Foo(2); assert(1 == foo2.call(&foo1.whoami)); return 0; } enum F = func(); } --