Comment #0 by jens.k.mueller — 2012-04-19T04:47:04Z
The following code does not compile but it should.
ufcs.d:
struct Foo
{
int _member;
alias _member this;
}
int foo(Foo f) { return f._member; }
unittest
{
Foo f;
f.foo(); // fails to compile
}
Using dmd2.059 you get:
Error: function ufcs.foo (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.
http://forum.dlang.org/thread/[email protected]