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

"Return value contains a constant value" spammed many times #5014

Open
jfecher opened this issue May 10, 2024 · 2 comments
Open

"Return value contains a constant value" spammed many times #5014

jfecher opened this issue May 10, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@jfecher
Copy link
Contributor

jfecher commented May 10, 2024

Aim

global COUNT = 400;

fn main() -> pub BoundedVec<[Field; 1], COUNT> {
    let mut result = BoundedVec::new();
    let mut x = 0;

    for _ in 0..COUNT {
        if x < 1 {
            result.push([0]);
        }
    }

    result
}

Expected Behavior

A "return value contains constant value warning"

Bug

Many repeated warnings are issued, presumably one for each element of the returned array.

To Reproduce

Project Impact

None

Impact Context

No response

Workaround

None

Workaround Description

No response

Additional Context

No response

Installation Method

None

Nargo Version

No response

NoirJS Version

No response

Would you like to submit a PR for this Issue?

None

Support Needs

No response

@jfecher jfecher added the bug Something isn't working label May 10, 2024
@TomAFrench
Copy link
Member

Agreed we should deduplicate these for each Noir program. This issue also applies to other instances such as verify_proof, etc.

@TomAFrench
Copy link
Member

#4365

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants