]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: add test case for using Alias types
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Fri, 1 Mar 2024 16:54:39 +0000 (23:54 +0700)
committerGopher Robot <gobot@golang.org>
Thu, 16 May 2024 01:45:48 +0000 (01:45 +0000)
CL 579935 disabled usage of Alias types in the compiler, and tracks
the problem with issue #66873. The test case in #65893 passes now
with the current tip. This CL adds a test case to ensure there is no
regression once Alias types are enabled for the compiler.

Updates #66873
Fixes #65893

Change-Id: I51b51bb13ca59549bc5925dd95f73da40465556d
Reviewed-on: https://go-review.googlesource.com/c/go/+/568455
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>

test/fixedbugs/issue65893.go [new file with mode: 0644]

diff --git a/test/fixedbugs/issue65893.go b/test/fixedbugs/issue65893.go
new file mode 100644 (file)
index 0000000..6f015fe
--- /dev/null
@@ -0,0 +1,16 @@
+// compile
+
+// Copyright 2024 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.
+
+package p
+
+type (
+       s  = struct{ f func(s1) }
+       s1 = struct{ i I }
+)
+
+type I interface {
+       S() *s
+}