On 5/11/20 8:44 AM, Jack Applegame wrote:
On Monday, 11 May 2020 at 12:30:22 UTC, Adam D. Ruppe wrote:
UFCS is only defined to work with global scope functions. A restricted import (module : symbol, symbols) puts things in local scope so ufcs doesn't apply.

But in this case the error should be displayed for lines 4 and 5, not 11.
Line 11 contains a call to a member function, not UFCS.

In addition, if you add the parentheses, then it works:
assert(rng.front() == '1');



Yeah, this is definitely a bug. If I change the return type of front to dchar from auto, it still thinks it's returning void.

Calling things like popFront without parentheses has an error "rng.popFront has no effect".

Clearly something isn't connecting properly, it's almost like it's resolving to the function itself instead of calling it.

-Steve
  • Bug? RazvanN via Digitalmars-d-learn
    • Re: Bug? Simen Kjærås via Digitalmars-d-learn
      • Re: Bug? RazvanN via Digitalmars-d-learn
    • Bug? Jack Applegame via Digitalmars-d-learn
      • Re: Bug? Jack Applegame via Digitalmars-d-learn
        • Re: Bug? Jack Applegame via Digitalmars-d-learn
      • Re: Bug? Adam D. Ruppe via Digitalmars-d-learn
        • Re: Bug? Jack Applegame via Digitalmars-d-learn
          • Re: Bug? Steven Schveighoffer via Digitalmars-d-learn
            • Re: Bug... Adam D. Ruppe via Digitalmars-d-learn
          • Re: Bug? Simen Kjærås via Digitalmars-d-learn
            • Re: Bug... Jack Applegame via Digitalmars-d-learn

Reply via email to