https://issues.dlang.org/show_bug.cgi?id=23416
--- Comment #2 from kdevel <[email protected]> --- This code should compile and pass its unittest: ```post2.d import std.stdio; struct S { void function () fp = &foo; void foo () { __PRETTY_FUNCTION__.writeln; fp = (&bar).funcptr; } void bar () { __PRETTY_FUNCTION__.writeln; fp = (&foo).funcptr; } auto fun () // invocation helper { void delegate () dg; dg.ptr = &this; dg.funcptr = fp; return dg (); } } unittest { S s; s.fun; s.fun; } ``` $ dmd -O -unittest -main -run post2 post2.d(3): Error: non-constant expression `& foo` But this code should compile and pass: $ gdc -O -funittest -fmain post2.d -o post2 && ./post2 void post2.S.foo() void post2.S.bar() 1 modules passed unittests --
