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

Shifting bits to 0-length BitVectors fails #2730

Closed
kleinreact opened this issue May 31, 2024 · 1 comment · Fixed by #2731
Closed

Shifting bits to 0-length BitVectors fails #2730

kleinreact opened this issue May 31, 2024 · 1 comment · Fixed by #2731

Comments

@kleinreact
Copy link
Member

kleinreact commented May 31, 2024

Shifting a bit into a 0-length BitVector with (+>>.) or (.<<+) currently fails with an out of range exception.

We should either define the operations to keep empty bit vectors unchanged or exclude them from the interface via adding some 1 <= n constraints.

The former would be the way to go in order to stay consistent with (+>>) and (<<+):

clashi> high +>> (Nil :: Vec 0 Bit)
Nil
clashi> (Nil :: Vec 0 Bit) <<+ low
Nil
@christiaanb
Copy link
Member

We've released v1.8.2, which includes a fix for this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants