mirror of
https://github.com/golang/go
synced 2024-11-26 13:38:20 -07:00
test: add test case that failed with gccgo
bug511.dir/b.go:10:14: error: reference to undefined field or method 'M' Change-Id: I9f96dc5c7254b310bc3e15b0bc588d62718cb4b2 Reviewed-on: https://go-review.googlesource.com/c/go/+/292009 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Cherry Zhang <cherryyz@google.com>
This commit is contained in:
parent
ad17b65b34
commit
9fe8ebf9b4
11
test/fixedbugs/bug511.dir/a.go
Normal file
11
test/fixedbugs/bug511.dir/a.go
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// 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 S struct{}
|
||||||
|
|
||||||
|
type A = S
|
||||||
|
|
||||||
|
func (A) M() {}
|
11
test/fixedbugs/bug511.dir/b.go
Normal file
11
test/fixedbugs/bug511.dir/b.go
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// 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 F() {
|
||||||
|
a.S{}.M()
|
||||||
|
}
|
9
test/fixedbugs/bug511.go
Normal file
9
test/fixedbugs/bug511.go
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
// 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.
|
||||||
|
|
||||||
|
// Gccgo mishandled type aliases as receiver types.
|
||||||
|
|
||||||
|
package ignored
|
Loading…
Reference in New Issue
Block a user