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 00c48ad commit ffb3e57Copy full SHA for ffb3e57
src/cmd/go/testdata/script/build_issue68658.txt
@@ -0,0 +1,31 @@
1
+# Test for issue #68658: In GOPATH mode, files with a //go:build fileVersion
2
+# earlier than go1.21 should downgrade to go1.21 and no further.
3
+
4
+[short] skip 'requires build'
5
6
+env GO111MODULE=off
7
+go build foo bar
8
9
+-- foo/main.go --
10
+//go:build go1.10
11
12
+package p
13
14
+import "fmt"
15
16
+func main() {
17
+ var x any // any was added in Go 1.18
18
+ fmt.Println(x)
19
+}
20
21
+-- bar/main.go --
22
+//go:build go1.20
23
24
25
26
27
28
29
+ y := max(1, 2) // max was added in Go 1.21
30
+ fmt.Println(y)
31
0 commit comments