-
Notifications
You must be signed in to change notification settings - Fork 163
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
Internal Compiler Error: Unhandled exception #2312
Comments
Yes, we don't support |
Actually I get a better error message with
So I guess this issue should be closed? |
Leave it open. This error message is a general developer error message that we have not implemented 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. |
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. |
@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. |
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. |
This problem has been fixed in #2442 . should we close this issue? |
Here is what I get on the above code now: $ lpython a.py
semantic error: The `async` keyword is currently not supported
--> a.py:1:1 - 2:17
|
1 | async def main():
| ^^^^^^^^^^^^^^^^^...
...
|
2 | print("done")
| ...^^^^^^^^^^^^^^^^^
Note: Please report unclear or confusing messages as bugs at
https://github.com/lcompilers/lpython/issues. So I think this issue is now fixed. |
It seems
asyncio
is not supported yet? I get the following error while importing it:As a workaround, I wanted to try this simple coroutine runner:
But I get:
The text was updated successfully, but these errors were encountered: