Comment #0 by dlang-bugzilla — 2023-05-13T11:56:28Z
////////////////// test.d //////////////////
void main()
{
int[int] aa;
try
aa.require(5, {
if (true)
throw new Exception("oops");
else
return 1;
}());
catch (Exception e) {}
assert(5 !in aa);
}
////////////////////////////////////////////
This allows bypassing the type system, as it allows the "construction" of types with `@disable this();`.
Comment #1 by robert.schadek — 2024-12-07T13:42:44Z