| 1 |
template fullyQualifiedName(T...) |
| 2 |
{ |
| 3 |
enum fullyQualifiedName = !T[0]; |
| 4 |
} |
| 5 |
|
| 6 |
void __trace_maybeDumpTupleToFile(Args...)(auto ref const Args args) nothrow @nogc { } |
| 7 |
|
| 8 |
int getStructInfoEx(T)() { |
| 9 |
enum Ctx = fullyQualifiedName!T; |
| 10 |
return 0; |
| 11 |
} |
| 12 |
|
| 13 |
auto as(Func)(Func) {} |
| 14 |
|
| 15 |
@nogc void foo() { } |
| 16 |
|
| 17 |
void assertOp(string OPERATION, LHS, RHS)(LHS lhs, RHS) { |
| 18 |
as({ |
| 19 |
try { |
| 20 |
try as(lhs); |
| 21 |
catch(Throwable) foo(); |
| 22 |
} catch(Throwable) assert(false); |
| 23 |
}); |
| 24 |
} |
| 25 |
|
| 26 |
struct FixedArray(T, size_t capacity_) { |
| 27 |
int a = getStructInfoEx!FixedArray; |
| 28 |
|
| 29 |
T* some_function() { |
| 30 |
assertOp !""(1, 1); |
| 31 |
return null; |
| 32 |
} |
| 33 |
alias some_function this; |
| 34 |
} |
| 35 |
|
| 36 |
struct ReclamationBatch { |
| 37 |
|
| 38 |
FixedArray !(uint,1) dummy; |
| 39 |
|
| 40 |
@nogc nothrow void some_inout_func() inout { } |
| 41 |
|
| 42 |
void func_2(Dlg)(Dlg dlg) { |
| 43 |
__trace_maybeDumpTupleToFile(dlg); |
| 44 |
} |
| 45 |
|
| 46 |
void _reclaimBatch() { |
| 47 |
func_2({ some_inout_func; }); |
| 48 |
} |
| 49 |
} |