view compile/c/const_42_B.d @ 1576:b3e16c86558e

[Issue 1398] New: GDC doesn't generate correct code <mariusmuja@gmail.com> 2007-08-04 http://d.puremagic.com/issues/show_bug.cgi?id=1398
author thomask
date Thu, 21 Feb 2008 15:20:08 +0000
parents fab5c8b013c2
children
line wrap: on
line source

// $HeadURL$
// $Date$
// $Author$

// @author@	Don Clugston <clugdbug@yahoo.com.au>
// @date@	2006-05-30
// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=165
// @desc@	[Issue 165] type inference fails with sizeof and circular imports

// __DSTRESS_DFLAGS__ compile/c/const_42_A.d

module /*dstress.*/compile.c.const_42_B;
import /*dstress.*/compile.c.const_42_A;

struct dog {
	wolf donkey;
	struct sheep {
		char pig;
	}
}

const X = dog.sheep.pig.sizeof;

static assert(is(typeof(X) == typeof(char.sizeof)));
static assert(X == char.sizeof);