https://issues.dlang.org/show_bug.cgi?id=22497
kinke <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from kinke <[email protected]> --- AFAIK, the problem is that the alias template parameter doesn't capture the context if bound to a nested function, unlike a delegate runtime parameter. `canon!"abc".fun!<delegateLambda>` would need a hidden context runtime parameter to forward to the lambda invocation: auto canon!"abc".fun!<lambda>(void* __lambda_context, int x) { return <lambda>(__lambda_context, x); } void main() { int x = 42; canon!"abc".fun!(y => y + x)(<main_context>, 1); } --
