Skip to content

Commit 1c6706c

Browse files
test: add test that caused a gofrontend crash
For #51291 Change-Id: If47e4cbf899853ade5050852c3870b9500da4c63 Reviewed-on: https://go-review.googlesource.com/c/go/+/406916 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com>
1 parent c6965ad commit 1c6706c

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

test/fixedbugs/issue51291.dir/a.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Copyright 2022 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
package a
6+
7+
type TypeA string
8+
9+
const StrA TypeA = "s"

test/fixedbugs/issue51291.dir/b.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Copyright 2022 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
package b
6+
7+
import "./a"
8+
9+
type TypeB string
10+
11+
const StrB TypeB = TypeB(a.StrA)

test/fixedbugs/issue51291.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// compiledir
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+
package ignored
8+
9+
// gofrontend crashed generating export data.

0 commit comments

Comments
 (0)