Re: [go-nuts] By passing go type check when performing bitwise operator

2019-09-01 Thread Michael Jones
Int(uint(a) >> uint(b)) Is always ok, costs nothing, not a type safety issue. On Sun, Sep 1, 2019 at 11:56 AM Steven Hartland wrote: > This has been changed in the upcoming 1.13 release, so you might want to > try the latest release candidate. > > > On 01/09/2019 19:03, Albert Tedja wrote: > >

Re: [go-nuts] By passing go type check when performing bitwise operator

2019-09-01 Thread Steven Hartland
This has been changed in the upcoming 1.13 release, so you might want to try the latest release candidate. On 01/09/2019 19:03, Albert Tedja wrote:  I am trying to perform some bitwise operators, but Go is not letting me because the mask is an uint and the values are int. Setting the mask to

[go-nuts] By passing go type check when performing bitwise operator

2019-09-01 Thread Albert Tedja
I am trying to perform some bitwise operators, but Go is not letting me because the mask is an uint and the values are int. Setting the mask to int will break the code since I am shifting bits right and left and prefer the prefix 0 when shifting right, and if I am not mistaken, Go does not