view 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
line wrap: on
line source

// $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);