June 11, 2020 [Issue 20922] New: Cannot get frame pointer in templated member function | ||||
|---|---|---|---|---|
| ||||
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@puremagic.com Reporter: simen.kjaras@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. -- | ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply