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

issue 174 #175

Merged
merged 3 commits into from
Oct 8, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
issue 174
  • Loading branch information
lemire committed Oct 7, 2024
commit 43e8b4d5a0fde24cfa2b1c102f07e2ff81e1c1f9
10 changes: 9 additions & 1 deletion bitset.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,16 @@
return FromWithLength(uint(len(buf))*64, buf)
}

// FromWithLength constructs from an array of words and length.
// FromWithLength constructs from an array of words and length in bits.
// This function is for advanced users, most users should prefer
// the From function.
// As a user of FromWithLength, you are responsible for ensuring
// that the length is correct: your slice should have length at
// least (len+63)/64 in 64-bit words.
func FromWithLength(len uint, set []uint64) *BitSet {
if uint(len(set)) < wordsNeeded(len) {

Check failure on line 116 in bitset.go

View workflow job for this annotation

GitHub Actions / test (1.16.x, ubuntu-latest)

cannot call non-function len (type uint)

Check failure on line 116 in bitset.go

View workflow job for this annotation

GitHub Actions / test (1.18.x, ubuntu-latest)

invalid operation: cannot call non-function len (variable of type uint)

Check failure on line 116 in bitset.go

View workflow job for this annotation

GitHub Actions / test (1.19.x, ubuntu-latest)

invalid operation: cannot call non-function len (variable of type uint)

Check failure on line 116 in bitset.go

View workflow job for this annotation

GitHub Actions / test (1.20.x, ubuntu-latest)

invalid operation: cannot call non-function len (variable of type uint)

Check failure on line 116 in bitset.go

View workflow job for this annotation

GitHub Actions / test (1.20.x, macos-latest)

invalid operation: cannot call non-function len (variable of type uint)

Check failure on line 116 in bitset.go

View workflow job for this annotation

GitHub Actions / test (1.18.x, ubuntu-latest)

invalid operation: cannot call non-function len (variable of type uint)

Check failure on line 116 in bitset.go

View workflow job for this annotation

GitHub Actions / test (1.19.x, ubuntu-latest)

invalid operation: cannot call non-function len (variable of type uint)

Check failure on line 116 in bitset.go

View workflow job for this annotation

GitHub Actions / test (1.20.x, ubuntu-latest)

invalid operation: cannot call non-function len (variable of type uint)
panic("BitSet.FromWithLength: slice is too short")
}
return &BitSet{len, set}
}

Expand Down
Loading