Re: [go-nuts] Wrong order for float64 conversion

2016-10-13 Thread Carl Mastrangelo
It appears you are right, thanks for the answer. On Thursday, October 13, 2016 at 9:25:07 PM UTC-7, Chris Manghane wrote: > > In the Go Language specification under operators ( > https://golang.org/ref/spec#Operators), there are a couple examples that > demonstrate this exact situation: > > var u

Re: [go-nuts] Wrong order for float64 conversion

2016-10-13 Thread 'Chris Manghane' via golang-nuts
In the Go Language specification under operators ( https://golang.org/ref/spec#Operators), there are a couple examples that demonstrate this exact situation: var u2 = 1< wrote: > https://play.golang.org/p/iZTogUaWWl > > In the program above, foo and bar compile but baz does not. It fails with >

[go-nuts] Wrong order for float64 conversion

2016-10-13 Thread Carl Mastrangelo
https://play.golang.org/p/iZTogUaWWl In the program above, foo and bar compile but baz does not. It fails with the message: "invalid operation: 1 << b (shift of type float64)". This seems to be wrong on the surface, since the order of operations should imply the shift takes precedence. In th