Mercurial > projects > dstress
view run/invariant_28.d @ 1566:b50583aebed4
r8719@birke: tk | 2007-09-30 11:08:05 +0200
[Issue 1518] Crash using 'scope', 'with' and undefined 'RegExp'
<regan@netmail.co.nz>
2007-09-19
http://d.puremagic.com/issues/show_bug.cgi?id=1518
author | thomask |
---|---|
date | Sun, 30 Sep 2007 09:47:53 +0000 |
parents | ec5e144583ea |
children |
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; }