465
|
1 // $HeadURL$
|
|
2 // $Date$
|
|
3 // $Author$
|
|
4
|
|
5 // @author@ Jarrett Billingsley <kb3ctd2@yahoo.com>
|
|
6 // @date@ 2005-03-23
|
1489
|
7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=3319
|
465
|
8
|
|
9 module dstress.run.mixin_12;
|
|
10
|
|
11 class A{
|
|
12 template M(){
|
|
13 int C(){
|
|
14 return 10;
|
|
15 }
|
|
16
|
|
17 int opCall(){
|
|
18 return 15;
|
|
19 }
|
|
20 }
|
|
21
|
|
22 mixin M m;
|
|
23
|
|
24 template N(){
|
|
25 int C(){
|
|
26 return 20;
|
|
27 }
|
|
28
|
|
29 int opCall(){
|
|
30 return 25;
|
|
31 }
|
|
32 }
|
|
33
|
|
34 mixin N n;
|
|
35 }
|
|
36
|
|
37 int main(){
|
|
38 A a=new A;
|
|
39 assert(a.m.C()==10);
|
|
40 assert(a.n.C()==20);
|
|
41
|
|
42 assert(a.m()==15);
|
|
43 assert(a.n()==25);
|
|
44 return 0;
|
|
45 }
|