Mercurial > projects > dstress
view nocompile/invariant_06.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_06; union MyUnion{ int i; void test(){ } invariant{ assert(0); } } int main(){ MyUnion u; u.test(); return 0; }