You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Leave it open. This error message is a general developer error message that we have not implemented visit_AsyncFunctionDef in the AST->ASR visitor.
However the error message should actually be the user error message where we underline the code that is not supported and explain why, possibly linking to a github issue.
@ujjwaltwitx you have to override the function visit_AsyncFunctionDef in AST to ASR, and raise a nice error message to the user. You can watch https://www.youtube.com/watch?v=yuYsyM08bss to get an idea how the internals work.
Sorry for replying this late. I was busy doing some other work. I will watch the video and if I face any difficulties, I will definitely get back to the community for help.
Am I required to add something more to this function. I have also add the visit_AsyncFunctionDef in BodyVisitor class. Here's the definition of the same
void visit_AsyncFunctionDef(const AST::AsyncFunctionDef_t &x) {
try
{
// BodyVisitor for visit_AsyncFunctionDef to be implemented
}
catch(const std::exception& e)
{
std::cerr << e.what() << '\n';
}
}
Activity
certik commentedon Sep 4, 2023
Yes, we don't support
asyncionatively yet. The second example should give a nice error, so that's a bug. Thanks for reporting it!davidbrochart commentedon Sep 5, 2023
Actually I get a better error message with
lpythonfrom conda-forge (the above was withlpythoncompiled locally):So I guess this issue should be closed?
certik commentedon Sep 5, 2023
Leave it open. This error message is a general developer error message that we have not implemented
visit_AsyncFunctionDefin the AST->ASR visitor.However the error message should actually be the user error message where we underline the code that is not supported and explain why, possibly linking to a github issue.
ujjwaltwitx commentedon Nov 30, 2023
Hello everyone, I want to work on this issue but I have no idea on how to approach this. Can someone just guide me a bit in the right direction.
certik commentedon Nov 30, 2023
@ujjwaltwitx you have to override the function visit_AsyncFunctionDef in AST to ASR, and raise a nice error message to the user. You can watch https://www.youtube.com/watch?v=yuYsyM08bss to get an idea how the internals work.
ujjwaltwitx commentedon Dec 1, 2023
Sorry for replying this late. I was busy doing some other work. I will watch the video and if I face any difficulties, I will definitely get back to the community for help.
ujjwaltwitx commentedon Dec 11, 2023
I have implemented visit_AsyncFunctionDef in SymbolTableVisitor class. Here's the definition of the function
Am I required to add something more to this function. I have also add the visit_AsyncFunctionDef in BodyVisitor class. Here's the definition of the same
Any feedback will be much appreciated.
syheliel commentedon Feb 16, 2024
This problem has been fixed in #2442 . should we close this issue?
certik commentedon Feb 16, 2024
Here is what I get on the above code now:
So I think this issue is now fixed.