https://issues.dlang.org/show_bug.cgi?id=21195
--- Comment #3 from Tomer Filiba (weka) <[email protected]> --- Simen, it's not the type of `S.func` or whatever, it's the & operator -- it should fail when trying to create a delegate to a method without a `this` The actual production code had a copy-paste error, it was more of the following: ``` struct Client { __gshared static PoolDict(int, Client, 1024) dict; static Client* getClient(int key) { if (key !in dict) { dict[key] = Client(...); registerTimer(5.minutes, &closeInactive); } } void closeInactive() { // a happy little method } } ``` if should have been ``` registerTimer(5.minutes, &dict[key].closeInactive); ``` don't worry about dict, it has a pool for the values, so it will not move objects. taking pointers to it is safe. my point is that ``` &closeInactive ``` shouldn't compile, because this expression cannot be a (correct) type --
