Skip to content

Commit 1901e26

Browse files
committed
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 <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Matthew Dempsky <[email protected]> Trust: Cuong Manh Le <[email protected]>
1 parent 5f3dabb commit 1901e26

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

test/fixedbugs/issue44266.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// errorcheck
2+
3+
// Copyright 2021 The Go Authors. All rights reserved.
4+
// Use of this source code is governed by a BSD-style
5+
// license that can be found in the LICENSE file.
6+
7+
package p
8+
9+
import "io"
10+
11+
type T1 interface {
12+
io.Reader
13+
}
14+
15+
type T2 struct {
16+
io.SectionReader
17+
}
18+
19+
type T3 struct { // ERROR "invalid recursive type T3"
20+
T1
21+
T2
22+
parent T3
23+
}

0 commit comments

Comments
 (0)