577
|
1 // $HeadURL$
|
|
2 // $Date$
|
|
3 // $Author$
|
|
4
|
|
5 // @author@ Regan Heath <regan@netwin.co.nz>
|
|
6 // @date@ 2005-06-10
|
1489
|
7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=4271
|
577
|
8
|
|
9 module dstress.run.o.overload_25_B;
|
|
10
|
|
11 template testT(T){
|
|
12 size_t test(T t){
|
|
13 return t.max;
|
|
14 }
|
|
15 }
|
|
16
|
|
17 size_t test(ubyte t){
|
|
18 return t.max;
|
|
19 }
|
|
20
|
|
21 mixin testT!(byte);
|
|
22 mixin testT!(int);
|
|
23
|
|
24 int main(){
|
|
25 byte b;
|
1086
|
26 if(test(b) != b.max){
|
|
27 assert(0);
|
|
28 }
|
577
|
29
|
|
30 ubyte ub;
|
1086
|
31 if(test(ub) != ub.max){
|
|
32 assert(0);
|
|
33 }
|
577
|
34
|
|
35 int i;
|
1086
|
36 if(test(i) != i.max){
|
|
37 assert(0);
|
|
38 }
|
577
|
39
|
|
40 return 0;
|
|
41 }
|