On 1/23/2014 5:44 PM, bearophile wrote:
So despite what the docs say, it seems the two types need to be the same for the sum to work?
I was going by what the spec said.
While this program compiles: package main import ("fmt") func main() { var x byte = 10; var y int = 1000; z1 := int(x) + y fmt.Println(z1) z2 := x + byte(y) fmt.Println(z2) }
Note the casts.