On Tue, Nov 10, 2020 at 8:50 PM Max Samukha via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> wrote:
> On Tuesday, 10 November 2020 at 14:36:04 UTC, Steven > Schveighoffer wrote: > > >> > >> Is there a way to get a pointer to a non-static nested > >> function? > > > > I don't think you can do it at compile time. You can at runtime > > by accessing the funcptr of the delegate. > > > > -Steve > > Thanks for the reply. I will post the issue to bugzilla. > Why? It works for me import std.stdio; void main() { void foo() { writeln("It works as expected"); } enum pfoo = &foo; void delegate() dg = pfoo; dg(); }