]> Cypherpunks repositories - gostls13.git/commitdiff
go/types: add test case for CL 486398
authorRuss Cox <rsc@golang.org>
Fri, 21 Apr 2023 14:31:34 +0000 (10:31 -0400)
committerGopher Robot <gobot@golang.org>
Fri, 21 Apr 2023 14:43:28 +0000 (14:43 +0000)
Forgot to 'git add' this test case in the CL.

Change-Id: Idde1d3d4525a99bdab0d3d69ac635a96a7cd5d73
Reviewed-on: https://go-review.googlesource.com/c/go/+/487335
Auto-Submit: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
src/internal/types/testdata/check/go1_xx_19.go [new file with mode: 0644]

diff --git a/src/internal/types/testdata/check/go1_xx_19.go b/src/internal/types/testdata/check/go1_xx_19.go
new file mode 100644 (file)
index 0000000..01f6b7d
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Check Go language version-specific errors.
+
+//go:build go1.19
+
+package p
+
+type Slice []byte
+type Array [8]byte
+
+var s Slice
+var p = (Array)(s /* ok because Go 1.X prior to Go 1.21 ignored the //go:build go1.19 */)