We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8235df3 commit ab24b7bCopy full SHA for ab24b7b
gopls/internal/regtest/marker/testdata/format/issue59554.txt
@@ -0,0 +1,33 @@
1
+Test case for golang/go#59554: data corruption on formatting due to line
2
+directives.
3
+
4
+Note that gofumpt is needed for this test case, as it reformats var decls into
5
+short var decls.
6
7
+Note that gofumpt requires Go 1.18.
8
9
+-- flags --
10
+-min_go=go1.18
11
12
+-- settings.json --
13
+{
14
+ "formatting.gofumpt": true
15
+}
16
+-- main.go --
17
+package main //@format(main)
18
19
+func Match(data []byte) int {
20
+//line :1
21
+ var idx = ^uint(0)
22
+ _ = idx
23
+ return -1
24
25
+-- @main --
26
27
28
29
30
+ idx := ^uint(0)
31
32
33
0 commit comments