view nocompile/invariant_04.d @ 59:96cadd0da1ae

added invariant tests
author thomask
date Fri, 22 Oct 2004 20:29:58 +0000
parents
children 5f98d4a33d49
line wrap: on
line source

// invariant is only allowed in classes (dmd-0.104 documentation)

module dstress.nocompile.invariant_04;

struct MyStruct{
	int i;

	void test(){
	}

	invariant{
		assert(0);
	}
}

int main(){
	MyStruct s;
	s.test();
	return 0;
}