Skip to content

Commit

Permalink
[dev.go2go] go/types: add test for crash 15 from issue 39634
Browse files Browse the repository at this point in the history
This test case doesn't crash anymore.

Updates #39634.

Change-Id: I29b13762265ef1c16c0298d141fdb6cf2c01f4ee
Reviewed-on: https://go-review.googlesource.com/c/go/+/241123
Reviewed-by: Robert Griesemer <gri@golang.org>
  • Loading branch information
griesemer committed Jul 6, 2020
1 parent a599706 commit c583a5d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/go/types/fixedbugs/issue39634.go2
Expand Up @@ -27,6 +27,11 @@ type foo8(type A) interface { type A }
func bar8(type A foo8(A))(a A) {}
func main8() {}

// crash 15
func y15() { var a /* ERROR declared but not used */ interface{ p() } = G15(string){} }
type G15(type X) s /* ERROR undeclared name */
func (G15 /* ERROR generic type .* without instantiation */ ) p()

// crash 16
type Foo16(type T) r16 /* ERROR not a type */
func r16(type T)() Foo16((Foo16(T)))
Expand Down

0 comments on commit c583a5d

Please sign in to comment.