Skip to content

Commit

Permalink
test: add test case that failed with gccgo
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
ianlancetaylor committed Feb 25, 2021
1 parent ad17b65 commit 9fe8ebf
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/fixedbugs/bug511.dir/a.go
Original file line number Diff line number Diff line change
@@ -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 changes: 11 additions & 0 deletions test/fixedbugs/bug511.dir/b.go
Original file line number Diff line number Diff line change
@@ -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 changes: 9 additions & 0 deletions test/fixedbugs/bug511.go
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 9fe8ebf

Please sign in to comment.