[Issue 20921] New: Cannot get frame pointer in templated static member function
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jun 11 08:44:00 UTC 2020
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: nobody at puremagic.com
Reporter: simen.kjaras at gmail.com
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.
--
More information about the Digitalmars-d-bugs
mailing list