From 67c86037af2bd46ff847cfa4e33b7148f58c1f93 Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Thu, 30 Nov 2023 12:52:01 -0800 Subject: [PATCH] go/types, types2: add testcase for alias issue Using the new type Alias node, this issue is now fixed. Add a test case. Fixes #50729. Change-Id: I22a4cf31b83de497e052989ca2054227e65e9937 Reviewed-on: https://go-review.googlesource.com/c/go/+/546455 Run-TryBot: Robert Griesemer Reviewed-by: Robert Findley Auto-Submit: Robert Griesemer TryBot-Result: Gopher Robot Reviewed-by: Robert Griesemer --- .../types/testdata/fixedbugs/issue50729b.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/internal/types/testdata/fixedbugs/issue50729b.go diff --git a/src/internal/types/testdata/fixedbugs/issue50729b.go b/src/internal/types/testdata/fixedbugs/issue50729b.go new file mode 100644 index 0000000000..bc1f4406e5 --- /dev/null +++ b/src/internal/types/testdata/fixedbugs/issue50729b.go @@ -0,0 +1,15 @@ +// -gotypesalias=1 + +// Copyright 2023 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 d[T any] struct{} +type ( + b d[a] +) + +type a = func(c) +type c struct{ a }