Mercurial > projects > dstress
annotate nocompile/offset_03.d @ 171:e2ba37f5b797
added .offset deprication tests
author | thomask |
---|---|
date | Wed, 01 Dec 2004 12:41:29 +0000 |
parents | |
children | e5bbb877feb9 |
rev | line source |
---|---|
171 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // Author$ | |
4 | |
5 // .offset isn't supported for unions | |
6 | |
7 module dstress.nocompile.offset_03; | |
8 | |
9 union MyUnion{ | |
10 int a; | |
11 int b; | |
12 } | |
13 | |
14 int main(){ | |
15 MyUnion u; | |
16 | |
17 assert(u.a.offset >= 0); | |
18 assert(u.b.offset >= 0); | |
19 assert(u.a.offset != u.b.offset); | |
20 | |
21 return 0; | |
22 } |