view run/offsetof_07.d @ 1619:bebc7472a832

Fix #7.
author Christian Kamm <kamm incasoftware de>
date Sat, 07 Nov 2009 18:55:30 +0100
parents dbb7a0ee8baf
children
line wrap: on
line source

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

module dstress.nocompile.offsetof_07;

struct MyStruct{
	int a;
	int b;	
}

int main(){
	MyStruct s;
	
	assert(MyStruct.a.offsetof >= 0);
	assert(MyStruct.b.offsetof >= 0);
	assert(MyStruct.a.offsetof != MyStruct.b.offsetof);

	return 0;
}