June 09, 2018 UFCS with static delegates | ||||
---|---|---|---|---|
| ||||
allow use of UFCS for delegates struct X { alias D = int function(X); static D F; } Then given x, x.F(); which translates in to X.F(x); Just because F is local to X shouldn't prevent UFCS from working on it. If F was global then we should use it and it would work fine, it's actually safer this way since F is local to X and cannot be hijacked. |
Copyright © 1999-2021 by the D Language Foundation