Skip to content

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

Merged
charles-cooper merged 3 commits intovyperlang:masterfrom
cyberthirst:fix/raw_log-constancy
Aug 5, 2024
Merged

fix[lang]: add raw_log() constancy check#4201
charles-cooper merged 3 commits intovyperlang:masterfrom
cyberthirst:fix/raw_log-constancy

Conversation

@cyberthirst
Copy link
Copy Markdown
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

@process_inputs
def build_IR(self, expr, args, kwargs, context):
context.check_is_not_constant(f"use {self._id}", expr)
Copy link
Copy Markdown
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
@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