DMD 0.165 release
BCS
BCS at pathlink.com
Tue Aug 22 09:02:53 PDT 2006
Bruno Medeiros wrote:
> Walter Bright wrote:
>
>> It just gives an ambiguity error at compile time.
>
>
> Why not (just as the in-out-inout case) give an error when the overloads
> are defined, instead of just when calling? Because if one will not be
> able to call the char[] version then it might as well be an error right
> then.
IIRC the in-out-inout case can't be done at the declaration, same goes
for other overloads
<code name="a.d">
void foo(in char);
</code>
<code name="b.d">
void foo(out char);
</code>
<code>
import a;
import b;
...
char c;
a.foo(c); //ok
b.foo(c); //ok
foo(c); //error
</code>
<code>
import a;
...
char c;
foo(c); //ok
</code>
you can't always tell if there is a collision until the call is made
More information about the Digitalmars-d-announce
mailing list