Comment #0 by default_357-line — 2019-12-05T14:53:51Z
Consider the following code:
// this works
assertThrown!AssertError({
assert(false, "hello world");
}(), "hello world");
// this doesn't work
struct S
{
bool b;
string s;
}
assertThrown!AssertError({
assert(S(false, "hello world").tupleof);
}(), "hello world");
Likewise for in().
This is annoying, because it prevents writing functions that either return success or an error value, or rather forces to call them twice.
Comment #1 by robert.schadek — 2024-12-13T19:06:22Z