]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/runnable/imports/link12144a.d
Add D front-end, libphobos library, and D2 testsuite.
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / runnable / imports / link12144a.d
1 module imports.link12144a;
2 struct S1 { bool opEquals(T : typeof(this))(T) { return false; } }
3 struct S2 { bool opEquals(T : typeof(this))(T) { return false; } }
4 struct S3 { bool opEquals(T : typeof(this))(T) { return false; } }
5 struct S4 { bool opEquals(T : typeof(this))(T) { return false; } }
6 struct S5 { bool opEquals(T : typeof(this))(T) { return false; } }
7 struct S6 { bool opEquals(T : typeof(this))(T) { return false; } ~this(){} }
8 struct S7 { bool opEquals(T : typeof(this))(T) { return false; } }
9 struct S8 { bool opEquals(T : typeof(this))(T) { return false; } }
10 struct S9 { bool opEquals(T : typeof(this))(T) { return false; } }
11
12 struct S10 { bool opEquals(T : typeof(this))(T) { return false; } }
13 struct S11 { bool opEquals(T : typeof(this))(T) const { return false; }
14 int opCmp(T : typeof(this))(T) const { return 0; }
15 size_t toHash() const nothrow @safe { return 0; } }
16 struct S12 { bool opEquals(T : typeof(this))(T) { return false; } }
17 struct S13 { bool opEquals(T : typeof(this))(T) { return false; } }
18 struct S14 { bool opEquals(T : typeof(this))(T) { return false; } }
19 struct S15 { bool opEquals(T : typeof(this))(T) { return false; } }
20 struct S16 { bool opEquals(T : typeof(this))(T) { return false; } }
21 struct S17 { bool opEquals(T : typeof(this))(T) { return false; } }
22 struct S18 { bool opEquals(T : typeof(this))(T) { return false; } }
23
24 void fun()()
25 {
26 { auto a = new S1[1]; }
27 { auto p = new S2(); }
28 { alias P = S3*; auto p = new P; }
29 { S4[int] aa; auto b = (aa == aa); }
30 { S5[] a; a.length = 10; }
31 { S6[] a; delete a; }
32 { S7[] a = []; }
33 { S8[] a = [S8.init]; }
34 { S9[int] aa = [1:S9.init]; }
35
36 { auto ti = typeid(S10[int]); }
37 { auto ti = typeid(int[S11]); }
38 { auto ti = typeid(S12[]); }
39 { auto ti = typeid(S13*); }
40 { auto ti = typeid(S14[3]); }
41 { auto ti = typeid(S15 function()); }
42 { auto ti = typeid(S16 delegate()); }
43 { auto ti = typeid(void function(S17)); } // TypeInfo_Function doesn't have parameter types
44 { auto ti = typeid(void delegate(S18)); } // ditto
45 }
46
47 struct B12146
48 {
49 bool opCmp(ubyte val) { return false; }
50 }