[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 <gri@golang.org>
This commit is contained in:
Robert Griesemer 2020-07-29 21:41:51 -07:00
parent 15144bdc72
commit deb678cebf
1 changed files with 4 additions and 0 deletions

View File

@ -30,6 +30,10 @@ type foo8(type A) interface { type A }
func bar8(type A foo8(A))(a A) {}
func main8() {}
// crash 9
type foo9(type A) interface { type foo9(A) }
func _() { var _ = new(foo9(int)) }
// crash 12
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 */