Skip to content

Commit

Permalink
fix call args constancy
Browse files Browse the repository at this point in the history
  • Loading branch information
tserg committed Nov 17, 2023
1 parent d82dbc0 commit eda9ba8
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions vyper/semantics/analysis/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,14 @@ def __init__(
self.expr_visitor = ExprVisitor(self.func)

# allow internal function params to be mutable
location, is_immutable = (
(DataLocation.MEMORY, False) if self.func.is_internal else (DataLocation.CALLDATA, True)
location, is_immutable, constancy = (
(DataLocation.MEMORY, False, VariableConstancy.MUTABLE)
if self.func.is_internal
else (DataLocation.CALLDATA, True, VariableConstancy.RUNTIME_CONSTANT)
)
for arg in self.func.arguments:
namespace[arg.name] = VarInfo(
arg.typ,
location=location,
is_immutable=is_immutable,
constancy=VariableConstancy.RUNTIME_CONSTANT,
arg.typ, location=location, is_immutable=is_immutable, constancy=constancy
)

for node in fn_node.body:
Expand Down

0 comments on commit eda9ba8

Please sign in to comment.