[Issue 21195] Delegate to method created without a `this` in certain contexts
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Aug 26 19:06:12 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=21195
kinke <kinke at gmx.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kinke at gmx.net
--- Comment #1 from kinke <kinke at gmx.net> ---
This isn't restricted to the context of static functions, this is also
accepted:
struct S {
void func() {
import std.stdio;
printf("func(this=%p)\n", &this);
}
}
void main() {
void function() f = &S.func;
f();
}
--
More information about the Digitalmars-d-bugs
mailing list