On Tuesday, 15 August 2023 at 20:09:28 UTC, Joel wrote:
On Tuesday, 15 August 2023 at 16:54:49 UTC, FeepingCreature wrote:
But does *not* import `std.ascii`! So there's no ambiguity inside the `sort` string expression between the two `toLower` functions..

How do I get it to work?

I tried std.ascii.toLower. And using alias toLower=std.ascii.toLower;

To elaborate more, `toLower` doesn't work because function-scope aliases are not considered for UFCS.

```
    alias toLower = std.ascii.toLower;

    ...
    // So this does actually work:
        .map!toLower
// but this does not, because it looks for a UFCS-capable symbol
        .map!(c => c.toLower)
    // but this does again
        .map!(c => toLower(c))

```

Reply via email to