struct S {
int i;
void fun() {
// Works fine
outside!(() => i);
// inside cannot get frame pointer to S.fun.__lambda2
inside!(() => i);
}
void inside(alias fn)() {
fn();
}
}
void outside(alias fn)() {
fn();
}
It seems more than a little counterintuitive that outside() can get a frame pointer from S.fun() while inside() cannot. I expect both to compile.
Comment #1 by dfj1esp02 — 2024-03-19T09:51:58Z
*** This issue has been marked as a duplicate of issue 5710 ***
Comment #2 by dfj1esp02 — 2024-03-19T10:05:37Z
*** Issue 21697 has been marked as a duplicate of this issue. ***