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

Overflowing assignment should result in an error #2236

Closed
Ethan-000 opened this issue Aug 9, 2023 · 0 comments · Fixed by #2321
Closed

Overflowing assignment should result in an error #2236

Ethan-000 opened this issue Aug 9, 2023 · 0 comments · Fixed by #2321
Assignees
Labels
bug Something isn't working

Comments

@Ethan-000
Copy link
Contributor

Ethan-000 commented Aug 9, 2023

Aim

run this with nargo execute

use dep::std;
fn main() {
    let x:u8 = 300;
    std::println(x);
}

Expected Behavior

should result in an error that says 300 does not fit in u8

Bug

outputs

"0x012c"
[modulo_overflow_test] Circuit witness successfully solved

To Reproduce

Installation Method

Compiled from source

Nargo Version

nargo 0.9.0 (git version hash: 6a10ecf, is dirty: false)

Additional Context

see #2008 (comment)

Would you like to submit a PR for this Issue?

Maybe

Support Needs

No response

@Ethan-000 Ethan-000 added the bug Something isn't working label Aug 9, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Aug 9, 2023
@Ethan-000 Ethan-000 changed the title Overflow assignment should result in an error Overflowing assignment should result in an error Aug 9, 2023
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Aug 15, 2023
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
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant