When look at the desugared code we try to access error from the frame and then assign it to error e.
That is not correct. The reason is in the above example
When examining the desugared code, we attempt to access an error from the frame and assign it to error e. However, this approach is incorrect.
on fail error e {
error res2 = e;
}
The reason for that is, in the example "on-fail" clause is part of the "do" block within the query action. As a result, it has no connection to the error and the query action.
Description
Consider the following example
We desugared the above program into the following form
When look at the desugared code we try to access error from the frame and then assign it to
error e
.That is not correct. The reason is in the above example
When examining the desugared code, we attempt to access an error from the frame and assign it to error e. However, this approach is incorrect.
The reason for that is, in the example "on-fail" clause is part of the "do" block within the query action. As a result, it has no connection to the error and the query action.
Steps to Reproduce
No response
Affected Version(s)
No response
OS, DB, other environment details and versions
No response
Related area
-> Compilation
Related issue(s) (optional)
No response
Suggested label(s) (optional)
No response
Suggested assignee(s) (optional)
No response