https://issues.dlang.org/show_bug.cgi?id=20922
Issue ID: 20922
Summary: Cannot get frame pointer in templated member function
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
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.
--