807
|
1 // $HeadURL$
|
|
2 // $Date$
|
|
3 // $Author$
|
|
4
|
|
5 // @author@ Chris Miller <chris@dprogramming.com>
|
|
6 // @date@ 2006-01-30
|
|
7 // @uri@ news:op.s36xvez5po9bzi@moe
|
1380
|
8 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=711
|
807
|
9
|
|
10 module dstress.run.m.mixin_16_A;
|
|
11
|
|
12 int step;
|
|
13
|
|
14 template Mixer(){
|
|
15 char test(){
|
|
16 if(step == 2){
|
|
17 step++;
|
|
18 return 'M';
|
|
19 }
|
|
20 }
|
|
21 }
|
|
22
|
|
23 class Foo{
|
|
24 char test(){
|
|
25 assert(0);
|
|
26 }
|
|
27 }
|
|
28
|
|
29 class FooBar : Foo{
|
|
30 mixin Mixer mixer;
|
1091
|
31
|
807
|
32 char test(){
|
|
33 if(step == 1){
|
|
34 step++;
|
|
35 return mixer.test();
|
|
36 }
|
1269
|
37 assert(0);
|
807
|
38 }
|
|
39 }
|
|
40
|
|
41 int main(){
|
|
42 FooBar f = new FooBar;
|
|
43 if(step == 0){
|
|
44 step++;
|
|
45 if(f.test() == 'M'){
|
|
46 if(step == 3){
|
|
47 return 0;
|
|
48 }
|
|
49 assert(0);
|
|
50 }
|
|
51 assert(0);
|
|
52 }
|
|
53 }
|