Skip to content

Commit c583a5d

Browse files
committed
[dev.go2go] go/types: add test for crash 15 from issue 39634
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 <[email protected]>
1 parent a599706 commit c583a5d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/go/types/fixedbugs/issue39634.go2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ type foo8(type A) interface { type A }
2727
func bar8(type A foo8(A))(a A) {}
2828
func main8() {}
2929

30+
// crash 15
31+
func y15() { var a /* ERROR declared but not used */ interface{ p() } = G15(string){} }
32+
type G15(type X) s /* ERROR undeclared name */
33+
func (G15 /* ERROR generic type .* without instantiation */ ) p()
34+
3035
// crash 16
3136
type Foo16(type T) r16 /* ERROR not a type */
3237
func r16(type T)() Foo16((Foo16(T)))

0 commit comments

Comments
 (0)