UFCS doubt

Adam Ruppe destructionator at gmail.com
Thu Jul 8 22:31:57 UTC 2021


On Thursday, 8 July 2021 at 22:24:26 UTC, Antonio wrote:
> I supossed  that ```mfp(c,20)``` and ```c.mfp(20)``` should be 
> equivalent because UFCS in second example, but it is not... why?

UFCS only works with functions defined at top level, not nested 
inside other functions. That's just how it is defined i don't 
really know why.


More information about the Digitalmars-d-learn mailing list