mirror of
https://github.com/golang/go
synced 2024-11-02 11:50:30 +00: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:
parent
98f3d7fecb
commit
641e8bc2c7
3 changed files with 32 additions and 0 deletions
13
test/fixedbugs/issue47131.dir/a.go
Normal file
13
test/fixedbugs/issue47131.dir/a.go
Normal 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)
|
||||
}
|
12
test/fixedbugs/issue47131.dir/b.go
Normal file
12
test/fixedbugs/issue47131.dir/b.go
Normal 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()
|
||||
}
|
7
test/fixedbugs/issue47131.go
Normal file
7
test/fixedbugs/issue47131.go
Normal 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
|
Loading…
Reference in a new issue