digitalmars.D.bugs - "matches both" still wrong
- Manfred Nowak (29/29) Aug 19 2005 This code compiles:
This code compiles: </code> void f( int i){ } debug void f( real r){ } void f( void function(int) dg){ } void f( void function(real) dg){ } void main(){ f( &f); } </code> But when the debug key word is erased this wrong message is issued: <message> test.d(7): function test.f called with argument types: (void(*)(int)) matches both: test.f(void(*)(int)) and: test.f(void(*)(real)) </message> It is wrong because as seen above this indeed are not both matches. A correct error message would be: test.d(7): function test.f called with an overloaded argument has at least two matches: test.f(void(*)(int)) and: test.f(void(*)(real)) -manfred
Aug 19 2005