[go-nuts] strange bug

2019-04-28 Thread robert engels
I accepted a PR for my fixed project. It was done by an expectedly experienced developer and it includes a test case. I find it very hard to believe that the author didn’t run and verify the test case, so that leaves me to believe that something in Go has change

Re: [go-nuts] strange bug

2019-04-28 Thread andrey mirtchovski
> So, the question is: why ‘i’ isn’t treated as unsigned, since it is a range > index - won't it always be positive? The author of the PR was most likely working on Go's tip (what will become 1.13), where the requirement that the right operator in a shift is an unsigned integer has been lifted.

Re: [go-nuts] strange bug

2019-04-28 Thread robert engels
Yes, I heard back from the author that he was using tip. Thanks for the help. > On Apr 28, 2019, at 10:03 AM, andrey mirtchovski > wrote: > >> So, the question is: why ‘i’ isn’t treated as unsigned, since it is a range >> index - won't it always be positive? > > The author of the PR was most

Re: [go-nuts] strange bug

2019-04-28 Thread robert engels
But still, it would seem the range index should be unsigned - what would be the purpose of it being signed? Similarly, the slice indexing should be unsigned as well. Just thinking about it... > On Apr 28, 2019, at 10:03 AM, andrey mirtchovski > wrote: > >> So, the question is: why ‘i’ isn’t t

Re: [go-nuts] strange bug

2019-04-28 Thread andrey mirtchovski
> But still, it would seem the range index should be unsigned - what would be > the purpose of it being signed? Similarly, the slice indexing should be > unsigned as well. Just thinking about it... not the first time this has come up. here are a couple of references: https://groups.google.com/d

Re: [go-nuts] strange bug

2019-04-28 Thread robert engels
Thanks. Interesting that in all my time with Go I didn’t really think about it. > On Apr 28, 2019, at 10:21 AM, andrey mirtchovski > wrote: > >> But still, it would seem the range index should be unsigned - what would be >> the purpose of it being signed? Similarly, the slice indexing should b