]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/compilable/fail260.d
Add D front-end, libphobos library, and D2 testsuite.
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / compilable / fail260.d
1 // PERMUTE_ARGS:
2 // REQUIRED_ARGS: -d
3
4 struct Static(uint width2, uint height2)
5 {
6 immutable width = width2;
7 immutable height = height2;
8
9 static Static opCall()
10 {
11 Static ret;
12 return ret;
13 }
14
15 alias float E;
16
17 template MultReturn(alias M1, alias M2)
18 {
19 alias Static!(M2.width, M1.height) MultReturn;
20 }
21
22 void opMultVectors(M2)(M2 b)
23 {
24 alias MultReturn!(Static, M2) ret_matrix;
25 }
26 }
27
28 void test()
29 {
30 alias Static!(4, 1) matrix_stat;
31 static matrix_stat m4 = matrix_stat();
32
33 alias Static!(1, 4) matrix_stat2;
34 static m6 = matrix_stat2();
35
36 m6.opMultVectors(m4);
37 }