Files
c3c/test/unit7/regression/unwrapping.c3
2025-02-24 01:05:45 +01:00

19 lines
255 B
Plaintext

module unwrapping;
fn bool! get_bool()
{
return true;
}
fn void bool_chain_unwrap() @test
{
bool b;
if (try v = get_bool() && b)
{
assert(v == true);
}
if (try v = get_bool() && v)
{
assert(v == true);
}
}