Skip to content

Error for incorrect type annotation #1975

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

Merged
merged 6 commits into from
Jun 21, 2023

Conversation

ubaidsk
Copy link
Collaborator

@ubaidsk ubaidsk commented Jun 21, 2023

fixes #1970

@ubaidsk ubaidsk requested a review from certik June 21, 2023 03:07
@ubaidsk ubaidsk marked this pull request as draft June 21, 2023 05:27
@ubaidsk ubaidsk force-pushed the error_for_incorrect_type_ann branch from f60035f to a6471ba Compare June 21, 2023 07:43
@ubaidsk ubaidsk force-pushed the error_for_incorrect_type_ann branch from a6471ba to 1dded4d Compare June 21, 2023 07:44
@ubaidsk ubaidsk marked this pull request as ready for review June 21, 2023 08:04
--> tests/errors/func_08.py:3:17
|
3 | def main0(x: In[In[i32]]):
| ^^^^^^^
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The error message here is shared with the error message for local variables with annotation In/ InOut / Out. See tests/errors/test_annassign_03.py in this PR. Therefore the error message is kept slightly general to cover both the cases.

@ubaidsk
Copy link
Collaborator Author

ubaidsk commented Jun 21, 2023

Ready.

@certik certik merged commit f2ba0ef into lcompilers:main Jun 21, 2023
@certik
Copy link
Contributor

certik commented Jun 21, 2023

Beautiful, thank you @Shaikh-Ubaid !

@ubaidsk ubaidsk deleted the error_for_incorrect_type_ann branch June 21, 2023 15:09
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.

Instantiating Lexer class causes SIGABRT
2 participants