A bug with matching overloaded functions?

flyinghearts flyinghearts at qq.com
Wed Dec 1 08:42:23 PST 2010


void check(string s)  {}
void check(wstring s) {}
void check(dstring s) {}

void main()
{
  check("test");
  //check("test"c);
}


D:\Desktop\d\zb.d(7): Error: function zb.check called with argument types:
	((string))
matches both:
	zb.check(string s)
and:
	zb.check(immutable(dchar)[] s)





The type of "test" is string, isn't it?



More information about the Digitalmars-d mailing list