import std.stdio; struct S(alias Fun){ // public: // uncomment to break compilation int x; void f() { writefln("%s, %d", Fun()? "yes":"no", x); } } void f1(int a, int b){ auto s = S!({ return a < b; })(3); s.f(); } void main(){ f1(10, 20); } This compiles and works as expected. But as soon as I added any access qualifier (even one redundant 'public:') to structure S, compilation breaks with message: bug001.d(9): Error: function bug01.f1.S!(delegate nothrow bool() { return a < b; } ).S.f cannot get frame pointer to __dgliteral1
Also fails on 2.059 Win32
Seems to work on git HEAD. Tested on Linux/64. Please reopen if problem reoccurs.