From: Robert Griesemer Date: Thu, 30 Nov 2023 20:52:01 +0000 (-0800) Subject: go/types, types2: add testcase for alias issue X-Git-Tag: go1.22rc1~123 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=67c86037af2bd46ff847cfa4e33b7148f58c1f93;p=gostls13.git 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 --- 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 }