www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - 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.
Jun 08 2018