-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support old-style 'catch' keyword #550
Comments
@erszcz interested in trying to pick this up. Do you have any suggestions on where to start? |
Why is this supposed to work? Wouldn't this need to describe the possibility of |
Ohh, I guess this is just how catch behaves. I am basically trying to make a smaller example,
This yields
|
If I read,
How would it guarantee the I am just trying to understand the issue. |
Hi, @chiroptical! Firstly, sorry for a long lack of response. I'm volunteering on this project and sometimes I just don't have as much time to spend on it as I'd like to. The point of this issue is that So how does This means that in the example at the top when we do case catch ra_server_sup_sup:restart_server(System, ServerId, #{}) of
{ok, _} -> ok;
{ok, _, _} -> ok;
{error, _} = Err -> Err;
{badrpc, Reason} -> {error, Reason};
{'EXIT', Err} -> {error, Err}
end. The Gradualizer should be aware of that, i.e. it should realise that given expression E of type T (also written as Your attempt at minimising the initial example is a good one! However, we cannot expect the |
The following code in rabbitmq/ra:
fails with:
even though it's clear that the
{'EXIT', Err}
pattern is there to handle the result added by a call protected withcatch
.The text was updated successfully, but these errors were encountered: