summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2011-12-09 14:58:28 -0500
committerRuss Cox <rsc@golang.org>2011-12-09 14:58:28 -0500
commitd0d0dbc94d0b2d722f1a3d4fc42483fa4c7d379a (patch)
treed4979f61d78c8450a916494ff4e9cb9eae0a8399 /test
parentb773c80bdc754c51227380947b34eb679ed859dd (diff)
downloadgo-d0d0dbc94d0b2d722f1a3d4fc42483fa4c7d379a.tar.gz
gc: 0 expected bugs
Now that Luuk's qualified exporting code is in, fixing this bug is trivial. R=ken2 CC=golang-dev http://codereview.appspot.com/5479048
Diffstat (limited to 'test')
-rw-r--r--test/bugs/bug367.dir/main.go12
-rw-r--r--test/fixedbugs/bug367.dir/main.go24
-rw-r--r--test/fixedbugs/bug367.dir/p.go (renamed from test/bugs/bug367.dir/p.go)7
-rw-r--r--test/fixedbugs/bug367.go (renamed from test/bugs/bug367.go)2
-rw-r--r--test/golden.out4
5 files changed, 28 insertions, 21 deletions
diff --git a/test/bugs/bug367.dir/main.go b/test/bugs/bug367.dir/main.go
deleted file mode 100644
index ab5d1702b..000000000
--- a/test/bugs/bug367.dir/main.go
+++ /dev/null
@@ -1,12 +0,0 @@
-package main
-
-import (
- "./p"
-)
-
-type T struct{ *p.S }
-
-func main() {
- var t T
- p.F(t)
-}
diff --git a/test/fixedbugs/bug367.dir/main.go b/test/fixedbugs/bug367.dir/main.go
new file mode 100644
index 000000000..21e9a5002
--- /dev/null
+++ b/test/fixedbugs/bug367.dir/main.go
@@ -0,0 +1,24 @@
+package main
+
+import (
+ "./p"
+)
+
+type T struct{ *p.S }
+type I interface {
+ get()
+}
+
+func main() {
+ var t T
+ p.F(t)
+ var x interface{} = t
+ _, ok := x.(I)
+ if ok {
+ panic("should not satisfy main.I")
+ }
+ _, ok = x.(p.I)
+ if !ok {
+ panic("should satisfy p.I")
+ }
+}
diff --git a/test/bugs/bug367.dir/p.go b/test/fixedbugs/bug367.dir/p.go
index 4e27d4e00..c8772d2d0 100644
--- a/test/bugs/bug367.dir/p.go
+++ b/test/fixedbugs/bug367.dir/p.go
@@ -3,14 +3,13 @@ package p
type T struct{ x int }
type S struct{}
-func (p *S) get() T {
- return T{0}
+func (p *S) get() {
}
type I interface {
- get() T
+ get()
}
func F(i I) {
- _ = i.get()
+ i.get()
}
diff --git a/test/bugs/bug367.go b/test/fixedbugs/bug367.go
index 073e3b180..25d11a153 100644
--- a/test/bugs/bug367.go
+++ b/test/fixedbugs/bug367.go
@@ -4,4 +4,4 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-ignored
+package ignored
diff --git a/test/golden.out b/test/golden.out
index f2e7f5ce3..6dccb6ec0 100644
--- a/test/golden.out
+++ b/test/golden.out
@@ -119,7 +119,3 @@ broke
0x0
== bugs/
-
-=========== bugs/bug367.go
-panic: interface conversion: main.T is not p.I: missing method get
-BUG: should not fail