]> Cypherpunks repositories - gostls13.git/commitdiff
test: add test case that failed with gccgo
authorIan Lance Taylor <iant@golang.org>
Mon, 15 Feb 2021 01:59:48 +0000 (17:59 -0800)
committerIan Lance Taylor <iant@golang.org>
Thu, 25 Feb 2021 15:24:25 +0000 (15:24 +0000)
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>
test/fixedbugs/bug511.dir/a.go [new file with mode: 0644]
test/fixedbugs/bug511.dir/b.go [new file with mode: 0644]
test/fixedbugs/bug511.go [new file with mode: 0644]

diff --git a/test/fixedbugs/bug511.dir/a.go b/test/fixedbugs/bug511.dir/a.go
new file mode 100644 (file)
index 0000000..33931a0
--- /dev/null
@@ -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() {}
diff --git a/test/fixedbugs/bug511.dir/b.go b/test/fixedbugs/bug511.dir/b.go
new file mode 100644 (file)
index 0000000..f8877d6
--- /dev/null
@@ -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()
+}
diff --git a/test/fixedbugs/bug511.go b/test/fixedbugs/bug511.go
new file mode 100644 (file)
index 0000000..edd3a23
--- /dev/null
@@ -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