Skip to content

Closure environments are treated as mutable when they actually aren't #4795

@aajj999

Description

Aim

Change mutable variables given in environment to lambda.
Mutable variable is created and then given as environment to lambda function. Lambda function changes this variable's value.

Expected Behavior

Mutable variables change their values outside of lambda function when they are in this function's environment.

Bug

Variables don't change their value.

To Reproduce

  1. Use repository: https://github.com/vlayer-xyz/repro-derived-constant
  2. Run nargo execute
  3. See the result

Project Impact

Nice-to-have

Impact Context

No response

Workaround

None

Workaround Description

No response

Additional Context

No response

Installation Method

Binary (noirup default)

Nargo Version

nargo version = 0.26.0 noirc version = 0.26.0+c46b164ce56e6a8f81255fb17eb6539bd040f336

NoirJS Version

No response

Would you like to submit a PR for this Issue?

None

Support Needs

No response

Activity

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

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

  • Status

    📋 Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions