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

fix[lang]: add raw_log() constancy check #4201

Merged
merged 3 commits into from
Aug 5, 2024

Conversation

cyberthirst
Copy link
Collaborator

What I did

How to verify it

  • added tests for pure and view func

@cyberthirst cyberthirst added this to the v0.4.1 milestone Aug 5, 2024
@@ -1267,6 +1267,8 @@ def infer_arg_types(self, node, expected_return_typ=None):

@process_inputs
def build_IR(self, expr, args, kwargs, context):
context.check_is_not_constant(f"use {self._id}", expr)
Copy link
Member

Choose a reason for hiding this comment

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

ideally i'd like this to be in the frontend or even use BuiltinFunctionT._modifiability, but this works for now

@charles-cooper charles-cooper changed the title fix[lang]: add constancy check for raw_log fix[lang]: add raw_log constancy check Aug 5, 2024
@charles-cooper charles-cooper merged commit 85269b0 into vyperlang:master Aug 5, 2024
156 checks passed
@charles-cooper charles-cooper changed the title fix[lang]: add raw_log constancy check fix[lang]: add raw_log() constancy check Aug 5, 2024
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.

Pure functions can emit logs
2 participants