elm/core

Bitwise.shiftLeft returns wrong value for 0.

ta3pks opened this issue · 2 comments

Bitwise.shiftLeft 1 0 is expected to return 1 however the return value is 0
here is a reproducable example

There is no Bitwise.shiftLeft since elm-lang/core 5.0.0 in Elm 0.18.

Currently in Elm 0.19, elm/core package only has shiftLeftBy, and the documentation is clear that shifting 0 to the left by one bit will give 0, not 1 (the first argument being the offset, and new bits being filled with zeros):

Shift bits to the left by a given offset, filling new bits with zeros. This can be used to multiply numbers by powers of two.

Maybe you are using an old version, or are confused by the order of the arguments?

Oh I just mixed the argument order sorry for the trouble