In switch case expressions, the condition on case clause was not always properly evaluated. Reverse the order of case clause evaluations (as already done for if-else-if fashion), and fix the wiring to false-next and true-next nodes. Fixes #1126.
13 lines
145 B
Go
13 lines
145 B
Go
package main
|
|
|
|
import "fmt"
|
|
|
|
func main() {
|
|
var x interface{}
|
|
x = "a" + fmt.Sprintf("b")
|
|
fmt.Printf("%v %T\n", x, x)
|
|
}
|
|
|
|
// Output:
|
|
// ab string
|