Summary: UFCS does not work with alias this
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from 2012-04-19 04:47:04 PDT ---
The following code does not compile but it should.

struct Foo
   int _member;
   alias _member this;

int foo(Foo f) { return f._member; }

   Foo f;; // fails to compile

Using dmd2.059 you get:
Error: function (Foo f) is not callable using argument types (int)
Error: cannot implicitly convert expression (f._member) of type int to Foo

Note, that this bugs prevents using UFCS with std.typecons.Tuple.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to