UFC creating name conflict

Paul Backus snarwin at gmail.com
Sat Oct 9 21:37:27 UTC 2021


On Saturday, 9 October 2021 at 21:26:52 UTC, Chris Piker wrote:
> Unfortunately importing `core.time` brings in a seconds 
> function, which due to UFC is confused with a structure member 
> of the same name.
>
> How can I explicitly tell the compiler that I'm referring to:
> ```d
> thing.seconds  # The structure member
> ```
> and not
> ```
> seconds(thing) # the function
> ```
> ?
>
> Currently my code fails to compile due do this ambiguity.

A struct member always takes priority over a UFCS function, so 
there must be something else going on that you've left out of 
your explanation. Can you post a complete example that we can use 
to reproduce your issue?


More information about the Digitalmars-d-learn mailing list