summaryrefslogtreecommitdiff
path: root/test/bugs
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2012-03-07 01:55:17 -0500
committerRuss Cox <rsc@golang.org>2012-03-07 01:55:17 -0500
commita0779e4d93783fba471554a8de6f352ffbb9b820 (patch)
treea509acc9fcc11dcc55d637e1bb64589fdf7180d1 /test/bugs
parentf30aac7243296cd0cdadb944bb4b33980a1b3e7a (diff)
downloadgo-a0779e4d93783fba471554a8de6f352ffbb9b820.tar.gz
cmd/gc: do not confuse unexported methods of same name
Fixes issue 3146. R=ken2 CC=golang-dev http://codereview.appspot.com/5756074
Diffstat (limited to 'test/bugs')
-rw-r--r--test/bugs/424.dir/lib.go16
-rw-r--r--test/bugs/424.dir/main.go61
-rw-r--r--test/bugs/424.go9
3 files changed, 0 insertions, 86 deletions
diff --git a/test/bugs/424.dir/lib.go b/test/bugs/424.dir/lib.go
deleted file mode 100644
index 97054da3a..000000000
--- a/test/bugs/424.dir/lib.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2012 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 lib
-
-type I interface {
- m() string
-}
-
-type T struct{}
-
-// m is not accessible from outside this package.
-func (t *T) m() string {
- return "lib.T.m"
-}
diff --git a/test/bugs/424.dir/main.go b/test/bugs/424.dir/main.go
deleted file mode 100644
index 64a600b55..000000000
--- a/test/bugs/424.dir/main.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2012 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.
-
-// Tests that method calls through an interface always
-// call the the locally defined method localT.m independent
-// at which embedding level it is and in which order
-// embedding is done.
-
-package main
-
-import "./lib"
-
-type localI interface {
- m() string
-}
-
-type localT struct{}
-
-func (t *localT) m() string {
- return "main.localT.m"
-}
-
-type myT1 struct {
- localT
-}
-
-type myT2 struct {
- localT
- lib.T
-}
-
-type myT3 struct {
- lib.T
- localT
-}
-
-func main() {
- var i localI
-
- i = new(localT)
- if i.m() != "main.localT.m" {
- println("BUG: localT:", i.m(), "called")
- }
-
- i = new(myT1)
- if i.m() != "main.localT.m" {
- println("BUG: myT1:", i.m(), "called")
- }
-
- i = new(myT2)
- if i.m() != "main.localT.m" {
- println("BUG: myT2:", i.m(), "called")
- }
-
- i = new(myT3)
- if i.m() != "main.localT.m" {
- println("BUG: myT3:", i.m(), "called")
- }
-
-}
diff --git a/test/bugs/424.go b/test/bugs/424.go
deleted file mode 100644
index b22776086..000000000
--- a/test/bugs/424.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// $G $D/$F.dir/lib.go && $G $D/$F.dir/main.go && $L main.$A && $A.out
-
-// Copyright 2012 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.
-
-// Test case for embedded method invocation.
-
-ignored