Hi,

I am surprised that this doesn't work:

class Foo
{
  void bar(string) {}
}

void bar(Foo foo, int i)
{
}

auto foo = new Foo();
foo.bar(123); // <=== error

causing compilation error:

main.d(24): Error: function main.Foo.bar (string _param_0) is not callable using argument types (int)

does UFCS now work with method overloading? I know it is not a syntax error because changing the name of int version of bar to bar2 and calling foo.bar2(123) works fine.

Reply via email to