[Issue 1192] broken overridden-function parameter list matching
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Apr 26 21:22:41 PDT 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1192
------- Comment #4 from thecybershadow at gmail.com 2007-04-26 23:22 -------
"suggest" was a bad word. Perhaps "getting confused over"? I think you
understood what I had in mind. Why would it be confused when the choice is
obvious? It can automatically convert from int to uint. Are you saying that
when the choice comes to choosing whether to convert a long to either a long or
to an ulong, both have the same priority and a conflict ensues? I don't think
so. This program:
void processLong(long x){}
void processLong(ulong x){}
void main() { long x; processLong(x); }
compiles perfectly. So obviously, the compiler doesn't take into consideration
every argument by itself, but compares the argument lists as a whole, unable to
see when one match is obviously better than the other.
I hope I made myself clear this time.
--
More information about the Digitalmars-d-bugs
mailing list