447
|
1 // $HeadURL$
|
|
2 // $Date$
|
|
3 // $Author$
|
|
4
|
|
5 // @author@ Kris <fu@bar.com>
|
|
6 // @date@ 2005-04-18
|
1489
|
7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=3684
|
447
|
8
|
736
|
9 // __DSTRESS_TORTURE_BLOCK__ -release
|
|
10
|
447
|
11 module dstress.run.bug_20050418_01;
|
|
12
|
|
13 class Buffer{
|
|
14 uint limit;
|
|
15 int position;
|
|
16
|
1559
|
17 invariant(){
|
|
18 if(position > limit){
|
|
19 assert(0);
|
|
20 }
|
447
|
21 }
|
|
22 }
|
|
23
|
|
24 class Mapped : Buffer{
|
|
25 this(){
|
|
26 }
|
|
27
|
|
28 ~this(){
|
|
29 }
|
|
30 }
|
|
31
|
|
32 int main(){
|
|
33 Buffer a = new Buffer();
|
|
34 Mapped b = new Mapped();
|
|
35 Buffer c = new Mapped();
|
|
36 assert(a);
|
|
37 assert(b);
|
|
38 assert(c);
|
|
39 return 0;
|
|
40 }
|