Mercurial > projects > dstress
annotate run/typeid_79.d @ 342:111c6744074d
typeid(type).tsize == type.sizeof
ahiru <ahiru@1dk.jp>
2005-03-01
news:d015pr$1t80$1@digitaldaemon.com
author | thomask |
---|---|
date | Tue, 22 Mar 2005 08:02:21 +0000 |
parents | c1ca2f37362b |
children | ec6d35cccfb5 |
rev | line source |
---|---|
136 | 1 /* $HeadURL$ |
2 * $Date$ | |
3 * $Author$ | |
4 */ | |
5 | |
6 module dstress.run.typeid_78; | |
7 | |
8 union MyUnion{ | |
9 int i; | |
10 byte b; | |
11 } | |
12 | |
13 int main(){ | |
14 TypeInfo ti = typeid(MyUnion[]); | |
15 assert(!(ti is null)); | |
342 | 16 assert(ti.tsize==(MyUnion[]).sizeof); |
334
c1ca2f37362b
added TypeInfo.toString checks to detect 'cheating'
thomask
parents:
136
diff
changeset
|
17 assert(ti.toString()=="MyUnion[]"); |
136 | 18 return 0; |
19 } |