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