We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f979832 commit 9734fd4Copy full SHA for 9734fd4
src/cmd/compile/internal/walk/switch.go
@@ -19,9 +19,10 @@ import (
19
// walkSwitch walks a switch statement.
20
func walkSwitch(sw *ir.SwitchStmt) {
21
// Guard against double walk, see #25776.
22
- if len(sw.Cases) == 0 && len(sw.Compiled) > 0 {
+ if sw.Walked() {
23
return // Was fatal, but eliminating every possible source of double-walking is hard
24
}
25
+ sw.SetWalked(true)
26
27
if sw.Tag != nil && sw.Tag.Op() == ir.OTYPESW {
28
walkSwitchType(sw)
0 commit comments