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

FunctionExpressionInConditionError seems to be unnecessary after Purity check in conditions. #3434

Open
bluesign opened this issue Jun 20, 2024 · 1 comment

Comments

@bluesign
Copy link
Contributor

Issue to be solved

It may be good idea to remove it, this will allow conditional event emitting etc.

Suggested Solution

I think removing should be safe, but history on git doesn't go that far.

@turbolent
Copy link
Member

turbolent commented Jun 20, 2024

Function expressions in conditions got forbidden because the implementation of the post-condition rewriting does not (yet) support them (see BeforeExtractor.ExtractFunction). Post conditions are rewritten to support the before special expression. We could probably allow function expressions in pre-conditions, but still need to double check that does not lead to security issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants