1
0
mirror of https://github.com/golang/go synced 2024-09-24 07:20:14 -06:00

test: add test case that caused a gofrontend compiler crash

For #47131

Change-Id: Ie2d5a2bd3dceec607544c43e6dc68bd5ea353091
Reviewed-on: https://go-review.googlesource.com/c/go/+/335172
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
Ian Lance Taylor 2021-07-16 12:16:21 -07:00
parent 98f3d7fecb
commit 641e8bc2c7
3 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,13 @@
// Copyright 2021 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 MyInt int
type MyIntAlias = MyInt
func (mia *MyIntAlias) Get() int {
return int(*mia)
}

View File

@ -0,0 +1,12 @@
// Copyright 2021 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"
func F2() int {
var mia a.MyIntAlias
return mia.Get()
}

View File

@ -0,0 +1,7 @@
// compiledir
// Copyright 2021 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