777
|
1 // $HeadURL$
|
|
2 // $Date$
|
|
3 // $Author$
|
|
4
|
|
5 // @author@ John Demme <me@teqdruid.com>
|
|
6 // @date@ 2005-12-05
|
1489
|
7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=5755
|
777
|
8
|
|
9 module dstress.run.o.odd_bug_04_B;
|
|
10
|
|
11 abstract class Container(V) {
|
1535
|
12 abstract int opApply(int delegate(ref V) dg);
|
777
|
13 }
|
|
14
|
|
15 abstract class MutableList(V): Container!(V) {
|
|
16 abstract MutableList insertBefore(int i, V item);
|
|
17
|
|
18 abstract MutableList append(V item);
|
|
19 abstract MutableList append(Container!(V) items);
|
|
20 }
|
|
21
|
|
22 class AbstractMutableList(V): MutableList!(V) {
|
|
23 MutableList!(V) prepend(Container!(V) items) {
|
|
24 foreach(V item; items) {
|
|
25 insertBefore(0, item);
|
|
26 }
|
|
27 return this;
|
|
28 }
|
|
29 }
|
|
30
|
|
31 int main(){
|
|
32 AbstractMutableList!(int) paramList;
|
|
33 test1();
|
|
34 test2();
|
|
35 return 0;
|
|
36 }
|
|
37
|
|
38 void test1(){
|
|
39 void testBoolParam() {
|
|
40 try {
|
|
41 throw new Exception( "uups" );
|
|
42 } catch (Exception o) {
|
|
43 }
|
|
44 }
|
|
45
|
|
46 testBoolParam();
|
|
47 }
|
|
48
|
|
49 void test2(){
|
|
50 void testBoolParam() {
|
|
51 try {
|
|
52 throw new Exception( "uups" );
|
|
53 } catch (Exception o) {
|
|
54 }
|
|
55 }
|
|
56
|
|
57 testBoolParam();
|
|
58 }
|