1 import core.stdc.stdio : printf;
3 //------------------------------------------------------------------------------
5 T enforce7452(T, string file = __FILE__, size_t line = __LINE__)
6 (T value, lazy const(char)[] msg = null) @safe pure
9 throw new Exception(msg ? msg.idup : "Enforcement failed", file, line);
18 void g7452() @safe pure
20 assert(4 == f7452(4));
23 //------------------------------------------------------------------------------
25 void e7452b(int, lazy int) pure nothrow @safe {}
31 void g7452b() pure nothrow @safe
33 assert(4 == f7452b(4));
36 //------------------------------------------------------------------------------
40 auto y = function int() { return 0; };
43 void g7452c() pure nothrow @safe
45 assert(4 == f7452c(4));
48 //------------------------------------------------------------------------------
50 auto f6332a()() { return 1; }
51 int f6332b()() { return 1; }
53 alias f6332a!() F6332a;
55 void g6332() pure nothrow @safe
62 //------------------------------------------------------------------------------