]>
Commit | Line | Data |
---|---|---|
b4c522fa IB |
1 | /* TEST_OUTPUT: |
2 | --- | |
3 | fail_compilation/test17451.d(22): Error: undefined identifier `allocator` | |
5fee5ec3 IB |
4 | fail_compilation/test17451.d(23): Error: `false` has no effect |
5 | fail_compilation/test17451.d(30): Error: variable `test17451.HashMap!(ThreadSlot).HashMap.__lambda2.v` size of type `ThreadSlot` is invalid | |
6 | fail_compilation/test17451.d(44): Error: template instance `test17451.HashMap!(ThreadSlot)` error instantiating | |
b4c522fa IB |
7 | --- |
8 | */ | |
9 | ||
10 | // https://issues.dlang.org/show_bug.cgi?id=17451 | |
11 | ||
12 | interface ManualEvent {} | |
13 | ||
14 | interface EventDriver { | |
15 | ManualEvent createManualEvent() ; | |
16 | } | |
17 | ||
18 | struct ArraySet(Key) | |
19 | { | |
20 | ~this() | |
21 | { | |
22 | try allocator; | |
5fee5ec3 | 23 | catch (Exception e) false; // should never happen |
b4c522fa IB |
24 | } |
25 | } | |
26 | ||
27 | struct HashMap(TValue) | |
28 | { | |
29 | alias Value = TValue; | |
30 | static if ({ Value v; }) {} | |
31 | } | |
32 | ||
33 | struct Task {} | |
34 | ||
35 | class Libevent2Driver : EventDriver { | |
36 | Libevent2ManualEvent createManualEvent() {} | |
37 | } | |
38 | ||
39 | struct ThreadSlot { | |
40 | ArraySet!Task tasks; | |
41 | } | |
42 | ||
5fee5ec3 | 43 | class Libevent2ManualEvent : ManualEvent { |
b4c522fa IB |
44 | HashMap!ThreadSlot m_waiters; |
45 | } |