Mercurial > projects > dstress
changeset 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 | b7d5fdb4245d |
children | 724d76f90c83 |
files | compile/o/offsetof_81_A.d |
diffstat | 1 files changed, 22 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compile/o/offsetof_81_A.d Sat Mar 31 08:27:03 2007 +0000 @@ -0,0 +1,22 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ <guido@grumpy-cat.com +// @date@ 2007-02-11 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=947 +// @desc@ [Issue 947] offsetof and alignof for an enum field of a struct fail to compile + +module dstress.compile.o.offsetof_81_A; + +enum E{ + A, + B +} + +struct S{ + int x; + E e; +} + +static assert(S.x.offsetof != S.e.offsetof);