wrong function overload
Thomas Kuehne
thomas-dloop at kuehne.cn
Fri Sep 29 00:04:12 PDT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Karen Lanrap schrieb am 2006-09-27:
> import std.stdio;
> enum COLOR{RED};
> enum TYPE{SOFT_TOP};
> class Car{
> int val;
> void roof( COLOR c)
> {
> val= 1;
> }
> void roof(TYPE t, int i)
> {
> val= 2;
> }
> }
> void main(){
> auto mycar= new Car;
> mycar.roof( TYPE.SOFT_TOP); // should not compile
> writefln( mycar.val); // should print 2
> }
Added to DStress as
http://dstres.kuehne.cn/nocompile/e/enum_50_A.d
http://dstres.kuehne.cn/nocompile/e/enum_50_B.d
http://dstres.kuehne.cn/nocompile/e/enum_50_C.d
http://dstres.kuehne.cn/nocompile/e/enum_50_D.d
http://dstres.kuehne.cn/nocompile/e/enum_50_E.d
Thomas
-----BEGIN PGP SIGNATURE-----
iD8DBQFFHMrsLK5blCcjpWoRAmTnAJ4hndbSLVzzv6QhD1UU8Yfvtx9eAwCfewI0
4P79FCUiddUz8QLhQGMN4Ao=
=cw8D
-----END PGP SIGNATURE-----
More information about the Digitalmars-d-bugs
mailing list