What version of Go are you using (go version)?
go version go1.8rc2 darwin/amd64
What operating system and processor architecture are you using (go env)?
GOARCH="amd64"
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
What did you do?
https://play.golang.org/p/hebuAYQ6eo
Take the program above, that on go 1.7.4 prints out "The right thing.", and run that with a go compiler of version 1.8rc2. You now find that it prints out "The wrong thing." Additionally interesting, if you comment out line 15, the second call to "panicWhen", then the first call behaves correctly.
What did you expect to see?
I expect the program to panic with "The right thing."
What did you see instead?
The first call to panicWhen gets the argument cond as false, and panics with "The wrong thing."
What version of Go are you using (
go version)?go version go1.8rc2 darwin/amd64
What operating system and processor architecture are you using (
go env)?GOARCH="amd64"
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
What did you do?
https://play.golang.org/p/hebuAYQ6eo
Take the program above, that on go 1.7.4 prints out "The right thing.", and run that with a go compiler of version 1.8rc2. You now find that it prints out "The wrong thing." Additionally interesting, if you comment out line 15, the second call to "panicWhen", then the first call behaves correctly.
What did you expect to see?
I expect the program to panic with "The right thing."
What did you see instead?
The first call to panicWhen gets the argument cond as false, and panics with "The wrong thing."