alias and UFCS
Anonymouse via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Jan 24 08:07:36 PST 2017
On Tuesday, 24 January 2017 at 13:11:41 UTC, ixid wrote:
> This code:
>
> T tFunc(alias F, T)(T n) {
> n.F;
> return n;
> }
>
> Produces this error:
>
> Error: no property 'F' for type 'int[]' (or whatever type I
> use).
I believe UFCS is supposed to only work with top-level functions.
I don't remember the rationale behind the decision.
More information about the Digitalmars-d-learn
mailing list