Skip to content
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

[FunC] Add more tests for try/catch #1380

Merged
merged 1 commit into from
Nov 14, 2024
Merged

Conversation

tolk-vm
Copy link
Contributor

@tolk-vm tolk-vm commented Nov 14, 2024

After fixing a bug with c1/c3 registers in #1332, cover an issue with tests.

Note, that there is such an example of unexpected try/catch behavior:

some_var = 0;
try {
    some_var = 999;
    call_function_that_throws();
} catch {
}
// here some_var is 0! not 999

Regardless of assignment, an exception restores all variables to their previous values. It's very unexpected, but it's how TVM works, not a bug. Probably, to be considered as a matter of TVM modification some day.

After fixing a bug with c1/c3 registers in #1332,
cover an issue with tests.
@tolk-vm tolk-vm added the FunC Related to FunC compiler label Nov 14, 2024
@EmelyanenkoK EmelyanenkoK merged commit 89f136e into testnet Nov 14, 2024
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FunC Related to FunC compiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants