781
|
1 // $HeadURL$
|
|
2 // $Date$
|
|
3 // $Author$
|
|
4
|
|
5 // @author@ Stewart Gordon <smjg_1998@yahoo.com>
|
|
6 // @date@ 2005-12-12
|
1489
|
7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=5835
|
781
|
8
|
870
|
9 // __DSTRESS_TORTURE_BLOCK__ -release
|
|
10
|
781
|
11 module dstress.run.i.in_out_body_11_H;
|
|
12
|
|
13 int inDerived;
|
|
14 int inBase;
|
|
15 int done;
|
|
16
|
|
17 class Base{
|
|
18 void test(int i)
|
|
19 in{
|
|
20 inBase++;
|
|
21 assert(0);
|
|
22 }body{
|
|
23 assert(0);
|
|
24 }
|
|
25 }
|
|
26
|
|
27 class Derived : Base{
|
|
28 void test(int i)
|
|
29 in{
|
|
30 inDerived++;
|
|
31 assert(0);
|
|
32 }body{
|
|
33 done++;
|
|
34 }
|
|
35 }
|
|
36
|
|
37 int main(){
|
|
38 Derived d = new Derived();
|
|
39
|
|
40 try{
|
|
41 d.test(1);
|
|
42 }catch(Exception e){
|
|
43 assert(done == 0);
|
|
44 assert(inBase == 1);
|
|
45 assert(inDerived == 1);
|
|
46
|
|
47 return 0;
|
|
48 }
|
|
49 return 0;
|
|
50 }
|