From 1901e2647f5724df38e9a9a3756dad01704bc783 Mon Sep 17 00:00:00 2001 From: Cuong Manh Le Date: Wed, 17 Feb 2021 01:14:19 +0700 Subject: [PATCH] test: add test for findTypeLoop with symbols from other packages CL 274294 improved findTypeLoop but also fixed a new found bug on master branch. This Cl adds test cases for this. Updates #44266 Change-Id: Ie4a07a3487758a1e4ad2f2847dcde975b10d2a77 Reviewed-on: https://go-review.googlesource.com/c/go/+/292889 Run-TryBot: Cuong Manh Le TryBot-Result: Go Bot Reviewed-by: Matthew Dempsky Trust: Cuong Manh Le --- test/fixedbugs/issue44266.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 test/fixedbugs/issue44266.go diff --git a/test/fixedbugs/issue44266.go b/test/fixedbugs/issue44266.go new file mode 100644 index 0000000000..c683e56075 --- /dev/null +++ b/test/fixedbugs/issue44266.go @@ -0,0 +1,23 @@ +// errorcheck + +// Copyright 2021 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 + +import "io" + +type T1 interface { + io.Reader +} + +type T2 struct { + io.SectionReader +} + +type T3 struct { // ERROR "invalid recursive type T3" + T1 + T2 + parent T3 +} -- 2.50.0