mirror of https://github.com/golang/go.git
[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:
parent
15144bdc72
commit
deb678cebf
|
|
@ -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 */
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue