1 /* TEST_OUTPUT: 2 --- 3 fail_compilation/test17451.d(22): Error: undefined identifier `allocator` 4 fail_compilation/test17451.d(23): Error: `long` has no effect in expression `false` 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 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 ArraySet(Key)18struct ArraySet(Key) 19 { 20 ~this() 21 { 22 try allocator; 23 catch false; // should never happen 24 } 25 } 26 HashMap(TValue)27struct HashMap(TValue) 28 { 29 alias Value = TValue; 30 static if ({ Value v; }) {} 31 } 32 33 struct Task {} 34 35 class Libevent2Driver : EventDriver { createManualEvent()36 Libevent2ManualEvent createManualEvent() {} 37 } 38 39 struct ThreadSlot { 40 ArraySet!Task tasks; 41 } 42 43 class Libevent2ManualEvent { 44 HashMap!ThreadSlot m_waiters; 45 } 46