This is a regression test for issue 65752: a break in a switch should
highlight the switch, not the enclosing loop.
-- a.go --
package a
func _(x any) {
for {
// type switch
switch x.(type) { //@hiloc(tswitch, "switch", text)
default:
break //@hiloc(tbreak, "break", text),highlight(tbreak, tswitch, tbreak)
}
// value switch
switch { //@hiloc(vswitch, "switch", text)
default:
break //@hiloc(vbreak, "break", text), highlight(vbreak, vswitch, vbreak)
}
}
}