Debian Codegraph @

gopls/internal/test/marker/testdata/definition/branch_issue73797.txt

raw
1 This test checks the case of a definition operation on a "continue" with an invalid label.
2 In gotip, the typechecker no longer associates the continue statement with its invalid label,
3 so this test case should only be run for go1.24 or earlier.
4 See the related change in go/types: https://go-review.git.corp.google.com/c/go/+/638257
5
6 -- flags --
7 -ignore_extra_diags
8
9 -- go.mod --
10 module mod.com
11
12 go 1.18
13
14 -- a/a.go --
15 package a
16
17 func InvalidLabel() {
18 label:
19 for i := 0; i < 10; i++ {
20 }
21 for i := 0; i < 10; i++ { //@loc(for, "for")
22 continue label //@def("continue", for)
23 }
24 }