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

Refactor inferred Future code for async functions. #28486

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

mikebenfield
Copy link
Collaborator

Now it's possible to call the same async function
from multiple async transitions.

@mikebenfield mikebenfield requested a review from d0cd January 8, 2025 19:04
@mikebenfield
Copy link
Collaborator Author

Unfortunately many test expectation .out files had to be regenerated as the SymbolTable struct now hashes differently.

@@ -0,0 +1,44 @@
/*
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add another test where finalize1 and finalize2 both take a u8 as a parameter? We should expect that test to pass.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's already the test async_function_called_twice.leo

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The difference would be that there are two async functions in the child program.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see.

Copy link
Collaborator

@d0cd d0cd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good! Left some nits and conceptual questions.

@mikebenfield mikebenfield force-pushed the new-future-inference branch 2 times, most recently from 3708b33 to dae124c Compare January 9, 2025 18:19
Now it's possible to call the same async function
from multiple async transitions.
@mikebenfield mikebenfield merged commit 51fd5dc into mainnet Jan 10, 2025
10 checks passed
@mikebenfield mikebenfield deleted the new-future-inference branch January 10, 2025 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants