UFCS doubt

jfondren julian.fondren at gmail.com
Thu Jul 8 22:31:49 UTC 2021


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

https://dlang.org/spec/function.html#pseudo-member

6. Functions declared in a local scope are not found when 
searching for a matching UFCS function.


More information about the Digitalmars-d-learn mailing list