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

Assertion fail on shifting int literals with a negative value. #698

Closed
Hejsil opened this issue Jan 17, 2018 · 0 comments
Closed

Assertion fail on shifting int literals with a negative value. #698

Hejsil opened this issue Jan 17, 2018 · 0 comments
Labels
Milestone

Comments

@Hejsil
Copy link
Member

@Hejsil Hejsil commented Jan 17, 2018

Zig version: 0.1.1.92fc5947

test "" {
    var a = 1 >> -1;
}
zig: /home/jc/Documents/zig/src/bigint.cpp:947: void bigint_shr(BigInt*, const BigInt*, const BigInt*): Assertion `!op2->is_negative' failed.
zsh: abort (core dumped)  zig test test.zig
  • This is the case for both shl, and shr.
@andrewrk andrewrk added the bug label Jan 17, 2018
@andrewrk andrewrk added this to the 0.2.0 milestone Jan 17, 2018
@andrewrk andrewrk closed this in 4b64c77 Jan 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants