Skip to content

Commit deb678c

Browse files
committed
[dev.go2go] go/types: add testcase for crash 9 of #39634
This test passes type-checking without problems but the generated code causes a cmd/compile error (filed #40486). Updates #39634. Change-Id: If3dd28605f6d8792c6bd5bb032624e9a6140b2c0 Reviewed-on: https://go-review.googlesource.com/c/go/+/245742 Reviewed-by: Robert Griesemer <[email protected]>
1 parent 15144bd commit deb678c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/go/types/fixedbugs/issue39634.go2

+4
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ type foo8(type A) interface { type A }
3030
func bar8(type A foo8(A))(a A) {}
3131
func main8() {}
3232

33+
// crash 9
34+
type foo9(type A) interface { type foo9(A) }
35+
func _() { var _ = new(foo9(int)) }
36+
3337
// crash 12
3438
var u /* ERROR cycle */ , i [func /* ERROR used as value */ /* ERROR used as value */ (u, c /* ERROR undeclared */ /* ERROR undeclared */ ) {}(0, len)]c /* ERROR undeclared */ /* ERROR undeclared */
3539

0 commit comments

Comments
 (0)