[Issue 412] New: overloaded function resolution with null parameter
Thomas Kuehne
thomas-dloop at kuehne.cn
Thu Oct 12 08:10:12 PDT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
d-bugmail at puremagic.com schrieb am 2006-10-09:
> http://d.puremagic.com/issues/show_bug.cgi?id=412
> typedef char[] String;
>
> void f( char[] c, char[] a ){
> }
>
> void f( char[] c, String a ){
> }
>
> void main(){
> f( "", "" ); // OK
> f( "", cast(String)"" ); // OK
> f( null, "" ); // OK
> f( null, cast(String)"" ); // line 14
> }
>
> // d.d(14): function d.f called with argument types:
> // (void*,String)
> //matches both:
> // d.f(char[],char[])
> //and:
> // d.f(char[],String)
Added to DStress as
http://dstress.kuehne.cn/run/o/overload_27_A.d
http://dstress.kuehne.cn/run/o/overload_27_B.d
http://dstress.kuehne.cn/run/o/overload_27_C.d
http://dstress.kuehne.cn/run/o/overload_27_D.d
http://dstress.kuehne.cn/run/o/overload_27_E.d
Thomas
-----BEGIN PGP SIGNATURE-----
iD8DBQFFLlsHLK5blCcjpWoRAkbiAKCiNJfmWx4owdJ3xlPFybasdbrZ3gCfZh2i
s0HtNm8o/n+Ucw132sJ5GQ0=
=RsTs
-----END PGP SIGNATURE-----
More information about the Digitalmars-d-bugs
mailing list