summaryrefslogtreecommitdiff
path: root/test/fixedbugs/bug374.go
diff options
context:
space:
mode:
authorLuuk van Dijk <lvd@golang.org>2011-11-07 21:35:13 +0100
committerLuuk van Dijk <lvd@golang.org>2011-11-07 21:35:13 +0100
commit1d2cab6eee6bb0f3972a6f19479ddd0058464c6a (patch)
tree0e7a8ed9ab9b40228709499c09770682b8f6b27f /test/fixedbugs/bug374.go
parent676112b3a07961b0c1a6abf80829704b798f3448 (diff)
downloadgo-1d2cab6eee6bb0f3972a6f19479ddd0058464c6a.tar.gz
gc: Clean up dostruct/stotype, detect broken fields and propagate up to structs and functions to supress spurious errors.
Fixes issue 1556. R=rsc CC=golang-dev http://codereview.appspot.com/5351042
Diffstat (limited to 'test/fixedbugs/bug374.go')
-rw-r--r--test/fixedbugs/bug374.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/fixedbugs/bug374.go b/test/fixedbugs/bug374.go
new file mode 100644
index 000000000..2e6f27adc
--- /dev/null
+++ b/test/fixedbugs/bug374.go
@@ -0,0 +1,20 @@
+// errchk $G $D/$F.go
+
+// Copyright 2011 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.
+
+// issue 1556
+package foo
+
+type I interface {
+ m() int
+}
+
+type T int
+
+var _ I = T(0)
+
+func (T) m(buf []byte) (a int, b xxxx) { // ERROR "xxxx"
+ return 0, nil
+} \ No newline at end of file