Would it be possible to extend `scope(exit)` and `scope(success)` to trigger properly for functions returning `Expected!T` as defined in the [expectations](https://code.dlang.org/packages/expectations) and [expected](https://code.dlang.org/packages/expected) DUB libraries?

For example is it possible to make this work as expected:
```d
Expected!int divide(int a, int b) nothrow
{
    scope (failure) writeln("division failed");
    scope (success) writeln("division succeeded");

    if (b == 0) return err!int("division by zero");
    return ok(a / b);
}
```

Reply via email to