https://issues.dlang.org/show_bug.cgi?id=20921
Issue ID: 20921
Summary: Cannot get frame pointer in templated static member
function
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
struct S {
int i;
void fun() {
// Works fine
outside!(() => i);
// staticInside cannot access frame of function S.fun
staticInside!(() => i);
}
static void staticInside(alias fn)() {
fn();
}
}
void outside(alias fn)() {
fn();
}
Since static member functions should be equivalent to free functions, the above
clearly should compile, but as indicated by comments, it does not.
--