Skip to content

Commit 6365efb

Browse files
ianlancetaylorgopherbot
authored andcommitted
test: add test case that caused a gofrontend crash
For #52841 Change-Id: If4723a70fba0dbedb5d1e70dab58f0b4612bf8b9 Reviewed-on: https://go-review.googlesource.com/c/go/+/405759 Auto-Submit: Ian Lance Taylor <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Cherry Mui <[email protected]>
1 parent 2136e15 commit 6365efb

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

test/fixedbugs/issue52841.go

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// compile
2+
3+
// Copyright 2022 The Go Authors. All rights reserved.
4+
// Use of this source code is governed by a BSD-style
5+
// license that can be found in the LICENSE file.
6+
7+
// Issue 52841: gofrontend crashed writing export data
8+
9+
package p
10+
11+
func F() {
12+
x := ([17][1]interface {
13+
Method9()
14+
Method10()
15+
}{
16+
func() (V47 [1]interface {
17+
Method9()
18+
Method10()
19+
}) {
20+
return
21+
}(),
22+
func(V48 string) (V49 [1]interface {
23+
Method9()
24+
Method10()
25+
}) {
26+
return
27+
}("440"),
28+
})
29+
_ = x
30+
}

0 commit comments

Comments
 (0)