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>
This commit is contained in:
Ian Lance Taylor 2022-05-17 15:41:59 -07:00
parent c6965ad63f
commit 1c6706c71b
3 changed files with 29 additions and 0 deletions

View file

@ -0,0 +1,9 @@
// Copyright 2022 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package a
type TypeA string
const StrA TypeA = "s"

View file

@ -0,0 +1,11 @@
// Copyright 2022 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package b
import "./a"
type TypeB string
const StrB TypeB = TypeB(a.StrA)

View file

@ -0,0 +1,9 @@
// compiledir
// Copyright 2022 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ignored
// gofrontend crashed generating export data.