]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/runnable/imports/test11931d.d
Add D front-end, libphobos library, and D2 testsuite.
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / runnable / imports / test11931d.d
1 module imports.test11931d;
2
3 import std.array;
4 import std.algorithm;
5
6 struct ConnectionPoint
7 {
8 void disconnect()
9 {
10 if(_f)
11 {
12 _f();
13 _f = null;
14 }
15 }
16 private void delegate() _f;
17 }
18
19 struct Signal(T, A...)
20 {
21 ConnectionPoint add(D f)
22 {
23 auto rf = { _arr = _arr.filter!(a => a != f).array; };
24 return ConnectionPoint();
25 }
26
27 private:
28 alias D = T delegate(A);
29 D _arr[];
30 }