digitalmars.D.bugs - [Issue 20921] New: Cannot get frame pointer in templated static
- d-bugmail puremagic.com (33/33) Jun 11 2020 https://issues.dlang.org/show_bug.cgi?id=20921
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 puremagic.com Reporter: simen.kjaras 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. --
Jun 11 2020