We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently, babygo supports only simple function calls:
babygo
defer f()
but not method calls;
defer obj.method()
We should capture and save the obj value on evaluating the defer statement. We can introduce an unnamed hidden variable to store it.
In other words,
This defer statement
can be transformed into something like this:
var __hidden_var__ T = obj defer __hidden_var__.method()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Currently,
babygo
supports only simple function calls:but not method calls;
How to do it
We should capture and save the obj value on evaluating the defer statement.
We can introduce an unnamed hidden variable to store it.
In other words,
This defer statement
can be transformed into something like this:
The text was updated successfully, but these errors were encountered: