Bug 20921 – Cannot get frame pointer in templated static member function

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-06-11T08:44:00Z
Last change time
2024-12-13T19:09:12Z
Keywords
rejects-valid
Assigned to
No Owner
Creator
Simen Kjaeraas
See also
https://issues.dlang.org/show_bug.cgi?id=20922
Moved to GitHub: dmd#19720 →

Comments

Comment #0 by simen.kjaras — 2020-06-11T08:44:00Z
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.
Comment #1 by robert.schadek — 2024-12-13T19:09:12Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19720 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB