Skip to content
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

For semantic function body state return can call multiple times #8

Closed
mrLSD opened this issue Oct 31, 2023 · 1 comment
Closed

For semantic function body state return can call multiple times #8

mrLSD opened this issue Oct 31, 2023 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@mrLSD
Copy link
Owner

mrLSD commented Oct 31, 2023

Description

For the semantic analyzer function_body function, there is the possibility to call multiple times return in case:

ast::BodyStatement::Expression(expression)  | ast::BodyStatement::Return(expression) => {...}

How to reproduce

  1. Set AST entity: ast::BodyStatement::Return
  2. Set AST entity: ast::BodyStatement::Expression

Expected behavior

🛑 Should add an error message to an error state

Actual behavior

No errors 🙆. Multiple-time return doesn't check.

@mrLSD mrLSD added the bug Something isn't working label Oct 31, 2023
@mrLSD mrLSD self-assigned this Oct 31, 2023
@mrLSD mrLSD added this to the v0.2.4 milestone Oct 31, 2023
@mrLSD
Copy link
Owner Author

mrLSD commented Oct 31, 2023

Fixed in #7

@mrLSD mrLSD closed this as completed Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant