You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package p
func il(s string) string {
switch len(s) {
case 0:
return "zero"
case 1:
return "one"
}
return s
}
func f() {
var s string
var as []string
switch false && (s+"a"+as[0]+il(s)+as[0]+s == "") {
}
}
What did you expect to see?
compilation
What did you see instead?
failure:
dwalkil.go:16:33: internal compiler error: second walk of switch
The text was updated successfully, but these errors were encountered:
Change https://golang.org/cl/156317 mentions this issue: cmd/compile: modify swt.go to avoid double walk of switch
katiehockman
changed the title
Yet another "internal compiler error: second walk of switch"
cmd/compile: yet another "internal compiler error: second walk of switch"
Jan 4, 2019
This is the result of an effort to root out all walked-a-node twice bugs.
What version of Go are you using (
go version
)?also tip
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
https://play.golang.org/p/0C-4ZutLsEc
Or go tool compile, with this input:
What did you expect to see?
compilation
What did you see instead?
failure:
The text was updated successfully, but these errors were encountered: