bits-and-blooms/bitset

noop in ShiftLeft for extension check

Closed this issue · 1 comments

Hi, sorry I don't understand this code snippet in bitset.go:ShiftLeft

1222   // capacity check
1223   if top+bits < bits {
1224     panic("You are exceeding the capacity")
1225   }

for me it's a noop.

No, it is not. Please run the following.

package main

import "fmt"

func main() {
	var x uint64 = 9223372036854775808

	if x+x < x {
		fmt.Println("Hello, How do you feel?")
	}
}

Closing this issue.