view nocompile/offset_01.d @ 172:e5bbb877feb9

extended offsetof / offset tests
author thomask
date Wed, 01 Dec 2004 13:53:23 +0000
parents e2ba37f5b797
children f87ba6507260
line wrap: on
line source

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

// .offset is depricated, use .offsetof

module dstress.nocompile.offset_01;

struct MyStruct{
	int a;
	int b;	
}

int main(){
	MyStruct s;

	assert(s.a.offset >= 0);
	assert(s.b.offset >= 0);
	assert(s.a.offset != s.b.offset);

	return 0;
}