720
|
1 // $HeadURL$
|
|
2 // $Date$
|
|
3 // $Author$
|
|
4
|
|
5 // @author@ Ivan Senji <ivan.senji_REMOVE_@_THIS__gmail.com>
|
|
6 // @date@ 2005-10-24
|
1489
|
7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=5191
|
720
|
8
|
|
9 module dstress.run.t.template_class_11_A;
|
|
10
|
|
11 class array(T) {
|
|
12 static T[] opIndex(T[] a ...) {
|
|
13 return a.dup;
|
|
14 }
|
|
15 }
|
|
16
|
|
17 int main(){
|
|
18 float[] f = array!(float)[1, 2, 3];
|
|
19
|
|
20 assert(f.length == 3);
|
|
21 assert(f[0] == 1.0);
|
|
22 assert(f[1] == 2.0);
|
|
23 assert(f[2] == 3.0);
|
|
24
|
|
25 return 0;
|
|
26 }
|