Comment #0 by ali.akhtarzada — 2018-06-26T03:33:43Z
Based on this forum thread: https://forum.dlang.org/thread/[email protected]
Aliasing an inner function seems inconsistent with aliasing a member function in that the former aliases the contexted function whereas the latter not:
void main() {
struct S { void f() {} }
S s;
void f() {}
alias inner = f;
alias member = s.f;
pragma(msg, typeof(&inner)); // delegate
pragma(msg, typeof(&member)); // function
}
so inner() can be called but not member() as you get: Error: need this for f of type void()
Comment #1 by robert.schadek — 2024-12-13T18:59:17Z