digitalmars.D.bugs - TypeInfo.tisize is zero. (bug?)
- ahiru (14/14) Feb 28 2005 void main() {
- ahiru (8/18) Feb 28 2005 mistake...
- Thomas Kuehne (12/29) Mar 22 2005 -----BEGIN PGP SIGNED MESSAGE-----
void main() { // tsize is a member of class TypeInfo. (see also dmd/src/phobos/object.d) assert(int.sizeof == typeid(int).tsize); // OK assert(double.sizeof == typeid(double).tsize); // OK alias void function() func; assert(typeid(func).sizeof == typeid(func).tsize); // NG (typeid(func).tsize == 0) alias int delegate() del; assert(typeid(del).sizeof == typeid(del).tsize); // NG (typeid(del).tsize == 0) } There is not the harm particularly, but it is ... May not tisize become always equal with sizeof? --- ahiru >(' )
Feb 28 2005
In article <d014bu$1rfe$1 digitaldaemon.com>, ahiru says...void main() { // tsize is a member of class TypeInfo. (see also dmd/src/phobos/object.d) assert(int.sizeof == typeid(int).tsize); // OK assert(double.sizeof == typeid(double).tsize); // OK alias void function() func; assert(typeid(func).sizeof == typeid(func).tsize); // NG (typeid(func).tsize == 0) alias int delegate() del; assert(typeid(del).sizeof == typeid(del).tsize); // NG (typeid(del).tsize == 0) }mistake... alias void function() func; assert(func.sizeof == typeid(func).tsize); // NG (typeid(func).tsize == 0) alias int delegate() del; assert(del.sizeof == typeid(del).tsize); // NG (typeid(del).tsize == 0) --- ahiru >(' )
Feb 28 2005
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 ahiru schrieb am Tue, 1 Mar 2005 07:32:11 +0000 (UTC):In article <d014bu$1rfe$1 digitaldaemon.com>, ahiru says...Added to DStress as http://dstress.kuehne.cn/run/typeid_84.d http://dstress.kuehne.cn/run/typeid_85.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFCP8/J3w+/yD4P9tIRAo7iAJ9NcjD7A5thuf9veJNCuiK9erKu4wCfZlLx rdUoJdv8hCXzHt6djiz0VuA= =74Nf -----END PGP SIGNATURE-----void main() { // tsize is a member of class TypeInfo. (see also dmd/src/phobos/object.d) assert(int.sizeof == typeid(int).tsize); // OK assert(double.sizeof == typeid(double).tsize); // OK alias void function() func; assert(typeid(func).sizeof == typeid(func).tsize); // NG (typeid(func).tsize == 0) alias int delegate() del; assert(typeid(del).sizeof == typeid(del).tsize); // NG (typeid(del).tsize == 0) }mistake... alias void function() func; assert(func.sizeof == typeid(func).tsize); // NG (typeid(func).tsize == 0) alias int delegate() del; assert(del.sizeof == typeid(del).tsize); // NG (typeid(del).tsize == 0)
Mar 22 2005