Mercurial > projects > dstress
annotate compile/o/offsetof_81_A.d @ 1444:b4b14259c787
r7392@birke: tk | 2007-03-29 16:20:48 +0200
[Issue 947] offsetof and alignof for an enum field of a struct fail to compile
<guido@grumpy-cat.com
2007-02-11
http://d.puremagic.com/issues/show_bug.cgi?id=947
author | thomask |
---|---|
date | Sat, 31 Mar 2007 08:27:03 +0000 |
parents | |
children |
rev | line source |
---|---|
1444 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 // @author@ <guido@grumpy-cat.com | |
6 // @date@ 2007-02-11 | |
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=947 | |
8 // @desc@ [Issue 947] offsetof and alignof for an enum field of a struct fail to compile | |
9 | |
10 module dstress.compile.o.offsetof_81_A; | |
11 | |
12 enum E{ | |
13 A, | |
14 B | |
15 } | |
16 | |
17 struct S{ | |
18 int x; | |
19 E e; | |
20 } | |
21 | |
22 static assert(S.x.offsetof != S.e.offsetof); |