-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Support frontend type check for If/While statements #3633
Comments
Do we also need to typecheck other statements such as |
I found that Chi IR also has a typechecking pass in |
Currently
However, we need to clearly separate user errors from compiler internal errors. Otherwise, neither users nor compiler developers can easily diagnose problems they meet. Currently we are moving 1 to the frontend, and we just align the behavior with I believe in the next step we also need to move 2 to the frontend. And for 3, we need to fix our compiler implementation and finally turn this pass into an optional pure verification pass. |
Concisely describe the proposed feature
We have the following test:
taichi/tests/python/test_type_check.py
Lines 30 to 41 in 21d9048
IfExp
was expanded to regularIf
statements in our new AST builder in #3299, and we didn't have type checks for the conditions ofIf/While
statements.To make the type error messages for
If/While
statements as easy to read as normal expressions, and to uncomment the above test, we'd better support frontend type check forIf/While
statements.The text was updated successfully, but these errors were encountered: