On Sunday, 28 January 2018 at 06:44:28 UTC, Timothee Cour wrote:
likewise the following compiles, but IMO should not:
class A{ void fun(this a){}}
(instead we should have typeof(this)
Yes, it's also confusing reading it, I thought it was template
this for a second. It even works if fun is static! This is ironic
as template this doesn't work outside of methods, even though it
should:
https://issues.dlang.org/show_bug.cgi?id=17713
In fact, template this syntax is backward:
void fun(this T)(){} // current
void fun(T this)(){} // could work?
The latter actually has the type and variable in the correct
position. (Not that I expect it will change now).