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

Compiler error when shifting too much #7428

Closed
asterite opened this issue Feb 18, 2025 · 0 comments · Fixed by #7429
Closed

Compiler error when shifting too much #7428

asterite opened this issue Feb 18, 2025 · 0 comments · Fixed by #7429
Labels
bug Something isn't working

Comments

@asterite
Copy link
Collaborator

asterite commented Feb 18, 2025

Aim

This program:

fn main() {
    let _: u8 = 1 << 128;
}

Expected Behavior

Expected it to compile fine.

Bug

It crashes with this error:

The application panicked (crashed).
Message:  attempt to shift left with overflow
Location: compiler/noirc_evaluator/src/ssa/ir/instruction/binary.rs:577

Same happens when shifting to the right.

To Reproduce

Workaround

None

Workaround Description

No response

Additional Context

No response

Project Impact

None

Blocker Context

No response

Nargo Version

No response

NoirJS Version

No response

Proving Backend Tooling & Version

No response

Would you like to submit a PR for this Issue?

None

Support Needs

No response

@asterite asterite added the bug Something isn't working label Feb 18, 2025
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Feb 18, 2025
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Feb 20, 2025
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