Mercurial > projects > dstress
view run/invariant_28.d @ 1528:36d8e64392df
[Issue 1187] Segfault with syntax error in two-level mixin.
Don Clugston <clugdbug@yahoo.com.au>
2007-04-24
http://d.puremagic.com/issues/show_bug.cgi?id=1187
author | thomask |
---|---|
date | Fri, 27 Apr 2007 17:31:50 +0000 |
parents | 1e6afb94ce6d |
children | ec5e144583ea |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // __DSTRESS_TORTURE_BLOCK__ -release module dstress.run.invariant_28; int status; int inv; class MyClass{ this(){ } public static void check(){ status++; } invariant{ check(); inv++; } } int main(){ MyClass o; assert(status==0); assert(inv==0); o=new MyClass(); assert(status==1); assert(inv==1); o.check(); assert(status==2); assert(inv==1); MyClass.check(); assert(status==3); assert(inv==1); return 0; }